Rotating 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
RollieMe
Posts: 4
Joined: Tue Jun 01, 2010 6:04 am

Rotating camera

Post by RollieMe »

Hi,

Tutorial 3 shows you how to rotate a custom scene node using CreateRotationAnimator().

I'm trying to apply this animator to the camera instead and, although it doesn't error it doesn't seem to do anything either.

Is the below code supported or am I expecting too much?

Code: Select all

	

	scene::ICameraSceneNode * camera;
	camera = smgr->addCameraSceneNode(0,core::vector3df(0,-150,400), core::vector3df(0,0,0));

        scene::ISceneNodeAnimator* camera_rotator =
		smgr->createRotationAnimator(core::vector3df(0.8f,0,0.8f));

	if(camera_rotator)
	{
		camera->addAnimator(camera_rotator);

	}
Thanks
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

it's probably because cameras don't react on rotation settings... :lol:
try bindTargetAndRotation() on the camera first... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
RollieMe
Posts: 4
Joined: Tue Jun 01, 2010 6:04 am

Post by RollieMe »

Thanks for the reply Acki. Calling that function did make the camera respond to the animator. However, I'm still not quite getting the effect I expected.

I've done some reading on the bindTargetAndRotation() method and I think I'll put this problem aside until I have a better overall understanding of Irrlicht.

Cheers
Post Reply