correct rotation

For questions about using Classic.

Post » Thu Apr 22, 2010 10:27 am

I'm making a game in which the player controls a rocket using the mouse, when you Left click the rocket "blows" away from the cursor in opposite direction. I've got the movement done but I can't make it rotate properly, it should be facing the direction it's moving. I've tried setting the angle of the ship using tan inverse(atan) of yspeed/xspeed but the rotation still isn't proper , can somebody help??

Here is a pic to help you understand better


here's the cap(v0.99.84)

http://dl.dropbox.com/u/5811650/Help%20 ... otype2.cap
B
9
S
3
G
3
Posts: 366
Reputation: 2,301

Post » Thu Apr 22, 2010 10:45 am

No need for math, do this:
[code:2n8intol]+ System: Always (every tick)
-> Sprite: Set angle to Sprite[CustomMovement].Angle
[/code:2n8intol]
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Thu Apr 22, 2010 3:20 pm

thanks..it worked I was breaking my head for no reason..
B
9
S
3
G
3
Posts: 366
Reputation: 2,301


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests