Jump to content

Set constant velocity for body [Physics.P2JS]?


adeptnix
 Share

Recommended Posts

since p2 is a physics engine and there isnt something like constant speed in the real world beecause of friction i guess you need to apply a constant force like an engine in the car.. the moment you step of the gas pedal your car slows down..

i would apply

somesprite.body.velocity.x = 200;

in the update loop. never step of the gas

Link to comment
Share on other sites

Could this not be approximated by playing with the properties such as damping, mass and so on? I'm not familiar with P2 but I believe you have fine control over the collision 'materials' so you could theoretically make something incredibly (or infinitely?) bouncy, so it loses no or little speed upon impacts?

Link to comment
Share on other sites

  • 3 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...