Velocity limit!!

Discussion and feedback on Construct 2

Post » Wed Oct 14, 2015 6:18 pm


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!
Posts: 2
Reputation: 236

Post » Wed Oct 14, 2015 8:22 pm

After a little digging it appears to be a limit imposed by the box2d library.

You can change it in the physics/runtime.js file in line #79:
Code: Select all
Box2D.Common.b2Settings.b2_maxTranslation = 2.0;

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.
Posts: 5,295
Reputation: 71,501

Post » Wed Oct 14, 2015 9:16 pm

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!!!!
Posts: 2
Reputation: 236

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests