Physijs icon indicating copy to clipboard operation
Physijs copied to clipboard

friction

Open JSirko opened this issue 9 years ago • 3 comments

I need to simulate a space ship, and there is now friction in space. Is it possible to disable it in Physijs so if body started to move it would never stop?

JSirko avatar Apr 06 '15 15:04 JSirko

not sure how to do this with physijs, but I think you can simply add the object to your loop and keep updating the position with a constant speed, in this way you should be able to achieve the same result.

mhmhartman avatar Apr 25 '15 11:04 mhmhartman

@JSirko, I think you may try setLinearVelocity, disable gravity and set friction to minimal value.

thedrint avatar Apr 28 '15 18:04 thedrint

@JSirko you can disable linear and angular damping (basically air friction) using .setDamping function in Physijs bodies:

// Disable friction in space...
body.setDamping(0, 0);

ghost avatar Apr 05 '16 20:04 ghost