Sponsored By

Collision Detection: Wall Slide.

This demonstration will use the result of the collision detection algorithm and detect a collision with any walls or combination of walls, and calculate a sliding vector, based on the normal of the wall it is colliding with, or going to collide with, and

Game Developer

December 2, 2011

1 Min Read

Collision Detection: Wall Slide.

This demonstration will use the result of the collision detection algorithm and detect a collision with any walls or combination of walls, and calculate a sliding vector, based on the normal of the wall it is colliding with, or going to collide with, and then translates the subject colliding (in this case, the camera) along that new sliding vector, or direction.

This demonstration will also introduce new concepts for creating binary geometry from text OBJ input, that will be readable and demonstrated by the next demo, which will show how to render cell like outdoor larger scenes, including LOD for terrain, and also uses the walkable and wall slide techniques explained here.

This demonstration will use 3 levels of walkable terrain, including perimiter walls, and indoor walls, and hallways including staircases to move up and down in the scene, the walkables will be imported as a single quad array, each walkable will contain all the different level’s quads, required for the gravity algorithm and checks, as the area is still quite small, compared to larger outdoor scenes, this has little impact on computations.

The entire scene will be lit with a directional light, and a few other lights, which are all specified in the map file, the map file will indicate what geometry should be loaded, from which distances it must be visible (bands, so LOD is possible), which decals do they use, what rendering techniques they use, and also the walkable and wall quads are also specified, for the scene.

Previous Demonstration:

ScreenR Demo:

Pictures:

Code Sample CollisionDetectionWallSlide 

Read more about:

Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like