Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Defining Complex Collision Boxes and Classes

This topic is 6177 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 am using very odd colision boxes to create levels in my game the shape is a basicly a triangular prism with either the top or the bottom surface at an odd angle... ASCII ART TIME .-_ /| __-. ./--- | | | | | | | | | | | | | | | | .--.----. that would be an orthographic view from the side of one of the boxes...the bottom of the box lays on the xz plane your looking at the xy plane my question is, how should the box be defined in 3d space? float floor_y; vector odd_angle_place_points[3] i am going to need to do operations against the box to determine how objects will move along the surface and against the walls. more important question, would classes be approiate for this? i am not very familar with them and have never used them before but they seem like they would do the job, i could put functions in the class for evaluating how the player would move against the box by calling one function from the main loop that says somthing like evaluatate this player posistion against your box. classes would also allow me to use other shapes and sence the code would be internal to the class it would only return the players involvment with the box, not worry about what the shape was that the player interacted with. this would be nice because i could use simple boxes for parts of what i need to do, it would reduce the complex math the computer would have to do... if anyone could give me some advice on this it''d really be appreciated, or if someone could just point me to some good information/refrence on using classes that would be great.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!