physics angle of motion

For questions about using Classic.

Post » Sat Feb 18, 2012 9:57 pm

how do i find the angle of motion of a physics object.

in know of the get previous x,y and current x,y angle thing.

but i was wondering if there was a more elegant solution using atan and the x and y velocity, or will that just be even more convoluted.Bartosh2012-02-18 22:47:04
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Sun Feb 19, 2012 12:52 am

angle(prevx,prevy,x,y)
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun Feb 19, 2012 1:37 pm

As lucid said, or altrnatively Angle(0,0,Object[Physics].VelocityX,Object[Physics].VelocityY)
B
8
S
2
G
2
Posts: 85
Reputation: 1,218

Post » Sun Feb 19, 2012 2:09 pm

[QUOTE=Funky Koval] As lucid said, or altrnatively Angle(0,0,Object[Physics].VelocityX,Object[Physics].VelocityY)[/QUOTE] yeah, the velocity way is better, as it doesn't require the prevx and prevy private variables, or their extra actions for updating
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Feb 20, 2012 12:22 am

Its good to see i can do it without having to keep unnecessary variables.

thanks koval, and lucid.
B
6
S
2
G
5
Posts: 249
Reputation: 2,323


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests