chipmunkpymunk

Units of velocity in Pymunk


I was wondering what the basic units of velocity are in Pymunk. If I put in a velocity of (50,50) does that correspond to 50 pixels/second in each direction? The API says that the units of angular velocity are rad/s but doesn't say anything about linear velocity.

Thanks.


Solution

  • Chipmunk avoids enforcing any particular units or scales. If you are using pixels for distance, and seconds for time, then velocity is in pixels per second. If you want to use meters and hours that’s fine too. As long as you drive it with the right input and interpret the output correctly you are good.