Sign in to follow this  

Walking up stairs XNA

This topic is 3570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 3570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this