volecity of falling physics obj.

Get help using Construct 2

Post » Sat Dec 01, 2012 6:29 pm

How do i check volecity of falling down a physics object?
i want create some event.
when falling speed is high and ball colides with wood > break wood
but when volecity is low dont do anything, just hit/bouncedelgado2012-12-01 18:31:58
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Sat Dec 01, 2012 7:46 pm

to get the Y velocity you just need
object.physics.VelocityY

to get the Velocity regardless of direction you can do:
sqrt( (obj.physics.velocityX^2) * (obj.physics.velocityY^2) )

or alternatively you could just do this trick:
distance(0,0,obj.physics.velocityX,obj.physics.velocityY)
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Sat Dec 01, 2012 8:31 pm

@keepee Thanks i use your "object.physics.VelocityY" but last two of your option i dont know how use
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Sun Dec 02, 2012 10:14 am

[QUOTE=delgado] @keepee Thanks i use your "object.physics.VelocityY" but last two of your option i dont know how use[/QUOTE]

Looks like the Pythagoras formula :)
B
5
Posts: 23
Reputation: 1,038


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt and 20 guests