Velocity limit!!

0 favourites
  • 3 posts
  • Hi,

    Why is there a velocity limit on physics? It's 6000. You can't assign a greater velocity to objects.

    Is there any way to change that limit?

    Thank you!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • After a little digging it appears to be a limit imposed by the box2d library.

    http://www.iforce2d.net/b2dtut/gotchas#speedlimit

    You can change it in the physics/runtime.js file in line #79:

    Box2D.Common.b2Settings.b2_maxTranslation = 2.0;[/code:3sww5aym]
    The 2.0 is in box2d units, so to double the max speed set it to 4.0.
    
    That's for the "box2d web" version of the "Physics engine", which you can select in the project properties.  I'm can't find where to change the setting in the "box2d asm.js" version since it's minified.
    
    Alternatively you could use the chipmunk physics behavior, it doesn't appear to have a limit.
  • Hi ROJOhound, thank you! Yeah that was the problem.

    But after reading the link you gave me, I found that the workaround is changing the pixel scale, so I found worldScale var on the runtime.js and I set it to 0.01 instead of 0.02.

    It works great now, also the Box3d.js was altered with that change.

    Thanks for your help!!!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)