top of page

RayCasting Support and Using it for collision detection

  • itzvnodm
  • Feb 14, 2015
  • 1 min read

The Maya plugin exports the collision data from the 'ctf_map' file.

  1. The exported data can readily be read by the engine and converted into flat list of triangles.

  2. Made a 'Player' entity that collides with the ground and walls. The camera is attached to this player's transform, like a 1st person game.

  3. The player does not fly... there is gravity, and is blocked by ground collision.

  4. The player is able to move forward and backward within the constraints of the collision.

  5. The player is able to go up and down inclines like the stairs, which is just a ramp.

  6. Picked an appropriate 'height' for the player. Ray is cast from this position straight and down to determine where the wall and ground is respectively.

  7. Switching from the Player to the Fly Cam will leave the Player behind. When switching back, the camera reattaches itself back to the player position and orientation it was in before the Fly Cam was enabled.


 
 
 

Comentários


Recent Posts
Archive
Search By Tags
bottom of page