Smooth mixed 1st + 3rd Person Camera Scene Node (for RPG)

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
xterminhate
Posts: 206
Joined: Thu Sep 01, 2005 9:26 pm
Location: France

Post by xterminhate »

That reminds me that most of the comments are not correct.... I think I will improve them on next release. :(
Return to Irrlicht after years... I'm lovin it.
It's hard to be a Man !
Si vis pacem para belum
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

thanks for that..... and I think your camera class deserves a documentation 8)
I got only 15 fps drop down by applying it, ,,, it is so smooth and even makes a collision animator response for camera
what is this thing...
xterminhate
Posts: 206
Joined: Thu Sep 01, 2005 9:26 pm
Location: France

Post by xterminhate »

I have just updated the camera. Do not hesitate to give me your impression. :)

Thanks,
Xterm-In'Hate.
Return to Irrlicht after years... I'm lovin it.
It's hard to be a Man !
Si vis pacem para belum
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

hy!

xterminhate it seems I have a problem. I use your rpg camera but I'm not sure it is your cade fault.

My character gets stuck in the map sometimes, which is very ennoing and I don't know why. I made another thread here some time ago, but no response : http://irrlicht.sourceforge.net/phpBB2/ ... 1&start=15
(is the 8th post).

Can someone please help me ?
Guest

Post by Guest »

CCameraRPGSceneNode does not handle player collisions.

You have to build a Collision Response Animator according Irrlicht tutorial. You have got an example into the main program packed with the CCameraRPGSceneNode package.

You should create a dedicated new thread and give us your code (coliision selector, animator, ...etc).

Thanks,
Xterminhate.
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

I guess my problem is in the design part ( the map ) and not in the programming part. I tested the camera with flat terrain and it works just fine. I will do more researching and if I can't find any solutions, I'll start a new thread.

Bye
xterminhate
Posts: 206
Joined: Thu Sep 01, 2005 9:26 pm
Location: France

Post by xterminhate »

Hope you will solve your problems too.... :-)

Note : Are you using height map for terrain rendering ?
Return to Irrlicht after years... I'm lovin it.
It's hard to be a Man !
Si vis pacem para belum
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

No.

I'm using 3ds max to make a .3ds file, then I import it in DeleD ,and save it as .dmf .
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

I encountered the same stucking problem if walking on highpoly ground...
no matter whether I applied the xterminhates camera or not, it happens
what is this thing...
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

welcome to the club needforhint :lol:
Guest

Post by Guest »

hi i got a error by compile the sample:
--------------------Configuration: main - Win32 Release--------------------
Compiling...
main.cpp
Compiling Irrlicht with Visual Studio 6.0, support for DX9 is disabled.
Linking...
main.obj : error LNK2001: unresolved external symbol "public: __thiscall irr::scene::CCameraRPGSceneNode::CCameraRPGSceneNode(class irr::scene::ISceneNode *,class irr::scene::ISceneManager *,int const &,class irr::IrrlichtDevice *,class irr::scene::
ITriangleSelector *,class irr::core::string<char> const &)" (??0CCameraRPGSceneNode@scene@irr@@QAE@PAVISceneNode@12@PAVISceneManager@12@ABHPAVIrrlichtDevice@2@PAVITriangleSelector@12@ABV?$string@D@core@2@@Z)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::E_DRIVER_TYPE,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,bool,class irr::IEventR
eceiver *,char const *)" (__imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PBD@Z)
Release/main.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

main.exe - 3 error(s), 0 warning(s)

--------------------Configuration: main - Win32 Debug--------------------
Compiling...
main.cpp
Compiling Irrlicht with Visual Studio 6.0, support for DX9 is disabled.
Linking...
main.obj : error LNK2001: unresolved external symbol "public: __thiscall irr::scene::CCameraRPGSceneNode::CCameraRPGSceneNode(class irr::scene::ISceneNode *,class irr::scene::ISceneManager *,int const &,class irr::IrrlichtDevice *,class irr::scene::
ITriangleSelector *,class irr::core::string<char> const &)" (??0CCameraRPGSceneNode@scene@irr@@QAE@PAVISceneNode@12@PAVISceneManager@12@ABHPAVIrrlichtDevice@2@PAVITriangleSelector@12@ABV?$string@D@core@2@@Z)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::E_DRIVER_TYPE,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,bool,class irr::IEventR
eceiver *,char const *)" (__imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PBD@Z)
Debug/main.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

main.exe - 3 error(s), 0 warning(s)



what can i do?
Guest

Post by Guest »

with dev-cpp the same error

Compiler: Default compiler
Building Makefile: "C:\rpg\Makefile.win"
Führt make... aus
make.exe -f "C:\rpg\Makefile.win" all
g++.exe main.o -o "example.exe" -L"C:/Dev-Cpp/lib" -L"C:/irrlicht-0.14.0/lib/Win32-gcc" ../irrlicht-0.14.0/lib/Win32-gcc/libIrrlicht.a

main.o(.text+0x802):main.cpp: undefined reference to `irr::scene::CCameraRPGSceneNode::CCameraRPGSceneNode(irr::scene::ISceneNode*, irr::scene::ISceneManager*, int const&, irr::IrrlichtDevice*, irr::scene::ITriangleSelector*, irr::core::string<char> const&)'
collect2: ld returned 1 exit status

make.exe: *** [example.exe] Error 1
Guest

Post by Guest »

You must compile CCameraSceneNode and CCAmeraRPGSceneNode before linking to your main.obj. Just add thoses file to your project.... :twisted:
xterminhate
Posts: 206
Joined: Thu Sep 01, 2005 9:26 pm
Location: France

Post by xterminhate »

I have just updated the camera. It's really smooth now. :D

Do not hesitate to give me your impression.

Enjoy,
Xterm-In'Hate.
Return to Irrlicht after years... I'm lovin it.
It's hard to be a Man !
Si vis pacem para belum
jclins
Posts: 86
Joined: Thu Jan 01, 2004 10:29 pm
Location: Texas, USA

Post by jclins »

xterminhate -- Cool stuff! I just tried v4 out. It's way too fast on my machine. Do you know how to slow it down? This is just cool. I was going to write my own, but you've done an excellent job already! :D

The controls is a bit ackward. It's not like other fps setup (quake, doom3, etc.). I guess you did mentioned that it is like guild wars (never played that game).
Post Reply