Walking up stairs XNA
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]
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.
Jeff.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement