Game Development Community

Gears of War style cover system

by Ben Rowland · in Torque Game Engine · 07/16/2007 (12:19 pm) · 0 replies

I would like to implement a GOW style cover system where if the player is near a wall or similar flat surface and presses a button they will move into a cover position from which they can peer out etc. Will .dif files supply enough information for this. My plan was to ray cast forward from the player when the button is pressed and look for a collision with the dif. Can I extract the polygon that the ray hits from the collision information and use that to let the player move around behind it. Also, is it possible to find adjacent polygons, allowing for movement around curved surfaces etc. Finally, can a dif file be created where only some of the polygons are flagged for collision (and can be invisible), so that the player only tries to go into cover behind appropriate polygons?

Any help would be much appreciated, particularly with information about the dif structure and how Torque uses it.