Can't figure how to rotate my 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
Moo
Posts: 30
Joined: Fri Jan 09, 2009 10:07 pm

Can't figure how to rotate my camera?

Post by Moo »

Hi, I'm completely mystified as I've been able to get along pretty well with Irr Licht so far, I can't figure how to rotate my camera.

if(Receiver.IsKeyDown(KEY_KEY_A))
{
camera->setPosition(vector3df(0, 10, -10));
camera->setRotation(vector3df(-100, 0, 0));
}

The function description of setRotation says it's relative, so I guess it SHOULD work. Yes, I used fairly big numbers simply to try. Regardless of the values put in vector3df, it still doesn't rotate.

P.S.: The position changes, and yes, it was just a test to see if the receiver/camera worked well, and they do. I'm really just stuck with that rotation :oops:

Thanks!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Use setTarget for cameras
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Moo
Posts: 30
Joined: Fri Jan 09, 2009 10:07 pm

Post by Moo »

bitplane wrote:Use setTarget for cameras
Then I'll have to figure a way to get a relative target and set it over again over time o.o
garrittg
Posts: 117
Joined: Wed Apr 20, 2005 6:17 pm
Location: Iowa, USA
Contact:

Post by garrittg »

jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

i think rotation is not cumulative. so do something like add say 5 degrees every keydown.
Post Reply