Angular velocity

For questions about using Classic.

Post » Sat Sep 18, 2010 7:13 pm

Hi,
I need to calculate the angular velocity of an object with sine behavior. I know that:
Angular velovity = delta angle / delta time
but I cannot figure how to calculate the delta angle
Can someone help?
B
2
G
2
Posts: 31
Reputation: 712

Post » Sat Sep 18, 2010 7:40 pm

Just keep track of the previous angle in a private variable like 'oldangle'. Then the delta angle would be Sprite.Angle-Sprite('oldangle').


[code:1xanolre]+ System: Always (every tick)
-> Text: Set text to "Angular Velocity: " & (Sprite.Angle-Sprite ('oldangle'))/TimeDelta
-> Sprite: Set 'oldangle' to Sprite.Angle
[/code:1xanolre]
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Sat Sep 18, 2010 8:51 pm

Thanks a lot!
B
2
G
2
Posts: 31
Reputation: 712


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests