Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Box2D marks stable range of object size is 0.1M ~ 10M. This specifies object size range. How about space size? If I make an 1M object at (1000.0f,1000.0f) position? Is it can be stable? Or should I assume spatial range is also limited same with object size?

PS. Maybe the resolution limit is defined because of limit of floating-point operations. I believe there's also some limitation on spatial range, but I couldn't figure out specific range myself.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The answer is yes and no. Calculations in local space won't be bothered by large positions, but calculations in world space will be.

Collisions, for example, happen in local space. If two 1x1, density 1, |v| = 1 objects collide, it doesn't matter where they are - no magnitude involved in the collision detection or correction is going to be much above 2. Likewise, a very large, dense, or fast object is not going to be stable no matter where it is.

But things like body position updates happen in world space. If the same object is at position 10000000 has a speed of 0.1/sec, it might as well have a speed of 0 - or worse, it might keep one component of velocity but not the other.

At 1000,1000 you're probably just fine, you've still got a bit of precision to spare. But the world is not unlimited in size.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.