rotating a model to face a point

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
Guest

rotating a model to face a point

Post by Guest »

hello,

i'm still trying to figure out how to rotate a model to face a point (see the "path finding" post), i need to make it face the camera (or player).

thanks for any help!!!
t
Posts: 43
Joined: Sun Nov 02, 2003 2:59 am
Location: Australia

Post by t »

bump

I searched through the forum, and though I'm sure I've seen the answer to this somewhere, I coudln't find it.

How do you rotate an node to face a given point?
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

Code: Select all

node->setRotation(core::vector3df(X,Y,Z));
It's in the API...
t
Posts: 43
Joined: Sun Nov 02, 2003 2:59 am
Location: Australia

Post by t »

That function rotates it by a certain amount on those axes, but not to face a given point, right?

I asked on flipcode and got an answer there if anyone's interested.

btw , [dx/x], what kind of game are you working on?
rogerdv
Posts: 93
Joined: Wed Aug 27, 2003 4:20 pm

Post by rogerdv »

Im interested in the solution, can you post it?
ru guo ni yao ai, ni jiang bu hui shi qu
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

t wrote:btw , [dx/x], what kind of game are you working on?
http://www.Supa-G.com It's supposed to be an action game in space, but we have 7 more days to finish it before it's due for a grade in my software engineering class and we don't even have the enemy AI written yet :(
Post Reply