I have been reading this book called "Game Physics Engine Development" and Came across this image in the context of Collision Resolution. enter image description here

See the contact Generator part. Can someone tell me what are constraints and how there can be different types of them? Thank you.


1 Answer 1


It's a bit of an educated guess without having the book to double check their context. In general, a constraint is something that must hold true for a given situation. In this specific instance, I would presume they are talking about situations where not all bodies generate collisions with each other.

For instance, you might have a portal that only interacts with the player and not other game objects. So the concept of isPlayerBody could be seen as a constraint (something that must be necessarily observed) in order to generate contact & collision data. By ignoring things that don't meet your constraints with (ideally) inexpensive calculations at an early stage you can save the trouble of doing more expensive calculations (computing contacts) later on.

As to the different types of constraints, they would be game specific and could represent a variety of things, but would ultimately need to represent some sort of boolean as either the constraint is observed or it is not.

Side note: in some situations there is the idea of a soft constraint which is something that you try to enforce if at all possible, but can relax to some degree (for instance if it is preempted by other constraints); I would be surprised if the book was referencing those as well, but given that the terminology can get mixed up, I thought they were worth mentioning.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .