Limit physics object speed

Get help using Construct 2

Post » Wed Jan 30, 2013 9:34 am

Hello,

I'm using force to push my physics object move in the air. sometimes it can go very fast, since it's in the air so I can't use friction to slow it down. I wonder if there is any way to set the max speed?
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Wed Jan 30, 2013 10:05 am

You can use Linear damping to slow down motion over time, between 0 and 1
B
39
S
12
G
8
Posts: 580
Reputation: 7,108

Post » Sun Feb 03, 2013 11:19 am

Thanks Crude. that's a good way. and there is also an option to set velocity
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Sun Feb 03, 2013 12:31 pm

I have same problem and I'd like to try it too, thanks a lot
and porky, where's the option to set velocity? I just can't find it
B
12
S
3
G
4
Posts: 56
Reputation: 3,235

Post » Sun Feb 03, 2013 4:11 pm

https://www.scirra.com/manual/98/physics

Search "Set velocity" ;)
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Sun Feb 03, 2013 4:32 pm

I don't know if it's the best way, but I use the action "Set Velocity" under the condition "Every Tick". I then do:

VX: clamp(player.Physics.VelocityX, -500, 500)
VX: clamp(player.Physics.VelocityY, -700, 700)boolean2013-02-03 16:33:16
B
24
S
4
G
1
Posts: 244
Reputation: 3,462


Return to How do I....?

Who is online

Users browsing this forum: farfetchd83, makkancs and 26 guests