How do I Compare Speed (Physics Object)

Get help using Construct 2

Post » Mon Apr 25, 2016 7:33 pm

So I'm trying to find a way of seeing how fast one of my physics objects, the player, is going. However it doesn't seem to be a 'speed' inbuilt to the physics object...

Thanks in before hand! :D
B
9
S
1
Posts: 28
Reputation: 735

Post » Mon Apr 25, 2016 8:35 pm

Read the fabulous manual! https://www.scirra.com/manual/98/physics

VelocityX
VelocityY
The current speed of the physics object, in pixels per second.
Mistakes were made.
B
58
S
29
G
115
Posts: 1,717
Reputation: 65,307

Post » Mon Apr 25, 2016 8:43 pm

Also from those expressions you can get the total speed with:
distance(0, 0, sprite.physics.velocityx, sprite.physics.velocityy)

You'll need to use system->compare or system->"pick by comparison" to compare it.
B
95
S
34
G
129
Posts: 5,497
Reputation: 82,182

Post » Wed Apr 27, 2016 3:50 pm

Thank you very much!
B
9
S
1
Posts: 28
Reputation: 735


Return to How do I....?

Who is online

Users browsing this forum: Hans the Red and 11 guests