FollowSplineAnimator

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.
Panos
Posts: 14
Joined: Wed Jan 17, 2007 6:00 pm

Post by Panos »

Finally I found a solution that works!!!

Here is my code in java:(anms my md2 and n a cude used for the rotation of anms)

Code: Select all

vector3df cur = anms.getPosition();
vector3df targ=n.getPosition();
vector3df dir =targ.subtractOperator(cur).normalize();
vector3df rotation = dir.getHorizontalAngle().addOperator(new vector3df(0,-90,0));
anms.setRotation(rotation);
I wouldn't have made it without your help.

Thanks again!!! :wink:
Java rules!!!
Post Reply