If I’ve got an object that is falling it’s linear velocity is increasing. If I move that object right by using setLinearVelocity(10, 0) so moves in that direction, why doesn’t the velocity slowly creep back to 0 on the x axis? If you throw a rock off a cliff it eventually falls straight down. Is there a way to simulate this or do I have to use an enterFrame event listener to slowly move it back to 0?
Did you try using linearDamping ?
http://developer.coronalabs.com/content/game-edition-physics-bodies#body.linearDamping
Hi Steve,
Linear velocity is essentially a “constant” speed on an object, not a one-time impulse. So, if you want the “rock falling” kind of behavior, you’re probably better off using “applyLinearImpulse()” or “applyForce()” to push it off the cliff, as a one-time event.
Brent
Did you try using linearDamping ?
http://developer.coronalabs.com/content/game-edition-physics-bodies#body.linearDamping
Hi Steve,
Linear velocity is essentially a “constant” speed on an object, not a one-time impulse. So, if you want the “rock falling” kind of behavior, you’re probably better off using “applyLinearImpulse()” or “applyForce()” to push it off the cliff, as a one-time event.
Brent