Walking up stairs XNA

Started by
1 comment, last by ddamicoAVI 16 years, 1 month ago
I created a basic stair case model and loaded it into my XNA game. I have a first person camera that needs to "climb" this stair case model. What is the best way to go about something like this? I tried to create bounding boxes around each step and then check if the bounding box intersected a bounding box that I created around the base of the camera. It sort of works going up the stairs, but coming down... not so much. Suggestions? Thanks, Dave [Edited by - ddamicoAVI on March 7, 2008 3:58:41 PM]
Advertisement
Easiest way I can think of (not sure if its the best)... is to have a function called "GetHeight()" on your ground plane (which includes the stairs). Then have the camera +x above the GetHeight() value. So if you hit the stairs, your camera will jump up on each step up.... this method will also work on walking on a not flat terrain too!

Jeff.
I'm really new to all of this... how do I set the ground plane?

This topic is closed to new replies.

Advertisement