Hey, I am currently trying to sort out animation for my character, and I need a way of letting the animator know that the player is turning.
Here is my code -
TVec3 PivotRotation=Vec3(0);
//Camera looking
mx=Curve(MouseX()-GraphicsWidth()/2,mx,6);
my=Curve(MouseY()-GraphicsHeight()/2,my,6);
dx=Curve(MouseX()-GraphicsWidth()/2,dx,28);
dy=Curve(MouseY()-GraphicsHeight()/2,dy,28);
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2);
camrotation.X=camrotation.X+my/10.0;
camrotation.Y=camrotation.Y-mx/10.0;
cam2rotation.X=cam2rotation.X+dy/10.0;
cam2rotation.Y=cam2rotation.Y-dx/10.0;
RotateEntity(pivot,camrotation);
RotateEntity(campivot,Vec3(camrotation.X,camrotation.Y,0));
EntityParent(camera,campivot);
PositionEntity(mesh,EntityPosition(player));
So any suggestions on how I can specify if it is turning?
Thanks in advance.