Hi Friends
I set all collision object properties to zero ( mass = 1 ) there is not any resistance or friction to falling object, why it’s velocity reaches to constant speed however there is gravity on it?
Solution: Lower the physics scale in your game.project file.
Thanks ross
maybe changing scale hides that wrong behavior but anyway it’s wrong, isn’t it? as i know in real world always falling object velocity is increasing due to this equation . the only reason to get constant velocity should be the air resistance but i set zero to all properties which makes resistance, it’s not usual to see constant velocity.
edit after changing scale:
in my case with scale 1 my constant velocity was 120, by chaing it to 0.1 it changed to 1200 but still constant velocity.
why it’s 120 velocity cap? ( as you said on that old topic )
next edit after testing matter js on phaser:
it seems matter js has velocity cap too
Well yeah. It’s a physics simulation, not real life. It should behave “correctly” up until that limit. I don’t know the exact reason for the limit, presumably some sort of optimization/stability thing. Why don’t computers perfectly simulate reality without limitations? Hmm…
I believe it’s also recommended to keep your objects’ sizes and masses within a factor of 100 too (from 0.1 to 10) to keep the simulation more reliable.
There are also bottom limits on how slowly objects can move and a minimum collision velocity to even be considered for bouncing apart.
I’ve bumped into this limit too. Best thing is to design the game with it in mind. For instance, made a racing game where the car constantly speeds up. I chose a scale which means the player would have lost control (game over) long before the limit is reached.
Thanks guys, it’s ok. I try to change some settings. I found someone had different problem with number of bodies in box2d in this page . does we have this limit with box2d in defold too? if yes is it possible to set new value for it using lua itself or should change in engine sources?
do you have any reference to all box2d physics limitations? or maybe you know other kind of them?
Probably, I’m not sure. It should be quick to test and verify.
We have no official list. I guess you have to discover them as you develop your game
by changing max numbers of sprites, objects and physics in gameproject setting i have tested 5000 objects with physics body and sprite. however frame rate was very low but no problem with instantiating thos objects, so there is not that limit about number of bodies in defold
using debug mode check on physics setting there is problem to show bodies for that number of phsycs body but they work well.