camera

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Melan
Posts: 9
Joined: Sun Sep 07, 2008 9:29 pm

camera

Post by Melan »

hey, how can i make a camera like that in the video:
http://de.youtube.com/watch?v=ryuBstQOyGk
you know what i mean? in front of the camera theres a person and the camera follows the person. if the person rotate to left the camera follows.
sure its a fps camera but i tried it like this:

Code: Select all

camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 400.0f);
camera->setTarget(nodeMario->getPosition());
well, the camera shows now to to mario person. but if i rotate around with the camera the mario dont follow and so on like in the video.
Can someone explain me this?
thx[/code]
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

uhm, search the forums... called tps camera, or third person camera...
there are a tons of it
Melan
Posts: 9
Joined: Sun Sep 07, 2008 9:29 pm

Post by Melan »

ok thx you
and how is the camera called used in mmorpgs like that:
http://de.youtube.com/watch?v=fJgfgXQgp ... re=related
is that also a tps?
thx
kingdutch
Posts: 76
Joined: Tue Sep 02, 2008 7:01 am

Post by kingdutch »

Looks like it :)
if (msg.getRubbishFactor() > rubbishLimit) { ignorePost(); cout << how it should be done << "\n"; }
Melan
Posts: 9
Joined: Sun Sep 07, 2008 9:29 pm

Post by Melan »

so a mmorpg camera is a tps camera?
and i tried a tps camera and it works gut, but i addet the colliosion and now the character flying up ( y is getting higher and higher) but i dont do anything. here is my code:
http://rafb.net/p/9I4fuA91.html
thx
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Look for rogerborg's third person camera code. That version is the cleanest version out there. I suggest you send him a PM about that code.

I have a version of my own, but that was before I saw a clean implementation. In other words, you don't want to see my version, it's ugly.
Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

I honestly don't remember posting a usable 3rd person camera. I can't find it with a search.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

I thought it was you, Rogerborg. Maybe it was someone else.

The code inherits from SceneNode, not from FPSSceneNode, tho.

Inheriting from SceneNode was the right way, my implementation was not correct as it inherited from FPSSceneNode, so I dragged all the code into the include directory. Yucck!

Anyway, I saw the video and it doesn't look right. Why? the avatar was not placed at the center. Rotation was off, what should've happened was the avatar takes camera pos, then the camera shifts back and then goes a step up.
Image
Post Reply