# What is the principle of providing a simplified physics in the game?

interested in the creation from scratch of analog physics(only for the hero to pass through walls, etc...)
what is less expensive resource method?
July 8th 19 at 12:00
July 8th 19 at 12:02
Solution
If the overall container of the character began to penetrate through the wall, then move your character along the normal to the wall at the penetration depth to have ceased to penetrate. Simplistic this is only a test of character dimensions the dimensions of the wall, but that wall needs to be aligned with the global coordinate system.
Then it is easier to place the objects in the mesh(the cube and process it with the physics) but it is also not then(there is a full-physics) - Marion.Rat commented on July 8th 19 at 12:05
overall container (the most primitive) aligned with the global coordinate axes. Due to this fundamentally simplifies the search of intersections. The mesh may not be axis-aligned and then have to calculate the intersection for each polygon in a mesh.
If you want all super straight-super simple and effective, instead of the overall cube use a dimensional field. There's generally all the calculations can be reduced to the distance from the point to the plane. Easier nowhere. - Kory.Jenki commented on July 8th 19 at 12:08
: hmm.. thanks for the idea on the scope!
so, if I use the scope for the hero, but other objects just Cuba or also the field of physics will work with a minimal CPU usage?
All right? - Marion.Rat commented on July 8th 19 at 12:11
Yes. You can still build a BSP tree or a "matrix" for the entire level to distinguish between all objects with fields and check intersection is not between all objects, but only between those who are in the same region.
I suspect that Unity or box2d can do it automatically.

By the way, even if you honestly consider the intersection polygon meshes, it is first best to check the intersection of the spheres or large containers. - Kory.Jenki commented on July 8th 19 at 12:14
: Thank You very much! - Marion.Rat commented on July 8th 19 at 12:17
July 8th 19 at 12:04