Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If the overall container of the character began to penetrate through the wall, then you move the character along the normal to the wall to the penetration depth so that it stops penetrating. Simplified than this would be just checking the dimensions of the character with the dimensions of the wall, but then all the walls must be aligned to the global coordinate system.
The most real: read of. documentation.
As simple as possible: keep a map of all impassable static objects, including walls, in memory and check for possible intersection before moving. If there is an intersection, we shorten the displacement vector to a direct intersection with the object and move the object there.
The question is that if there are moving impassable objects, then you will still have to check the intersections geometrically and radially, calculating the inscribing of a circle (ball) into a polygon (polyhedron). That's why it's a bicycle. The standard means of the "engine" will cope unambiguously faster.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question