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: 26
Reputation: 731

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
53
S
27
G
114
Posts: 1,699
Reputation: 64,446

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
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Wed Apr 27, 2016 3:50 pm

Thank you very much!
B
9
S
1
Posts: 26
Reputation: 731


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests