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);
Thanks again!!!