- Code: Select all
double mouseangle = direction(xscreen, yscreen, xmouse, ymouse);
animpos = (mouseangle/360.0)*(nframes);
double mouseangle = direction(xscreen, yscreen, xmouse, ymouse);
animpos = (mouseangle/360.0)*(nframes);
animpos = (mouseangle/360.0)*(nframes);
animpos = (mouseangle/180.0)*(nframes);
ALK3_Steph wrote:Ive got a ship, with 16 animations of it rotating around, full 360. I looked at the demo for the Moon Defender and figured out to make it rotate in the direction towards the mouse, but my problem is its backwards. If I point the mouse up the ship is facing down. So, how would I fix that? Here is the code
- Code: Select all
double mouseangle = direction(xscreen, yscreen, xmouse, ymouse);
animpos = (mouseangle/360.0)*(nframes);
Users browsing this forum: No registered users and 1 guest