Jump to content
  • Advertisement


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


Driving Game

This topic is 6126 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 trying to make a driving game. I made the track in 3dmax using the donut shape to make all the polygones for this round test track. I rendered it to the screen and it looks fine. I also have a camera in 3d space (which is the car). I want to make to car stick to the track. I need some way of finding the camera height at a givin point on the track. To do this I need to find what poly the camera is now on and extrapolate the y(y axe is up/down) value of the polygone knowing all 4 vertexes. Heres what I do: (assume y axe is up/down, x axe is left/right and z is in/out) 1) I use a bounding box approch to find what poly im in. but this isnt enough. I then use the line equations for the lines that make up the poly to fiqure out if the camera is actually inside the poly. This long algo gets me the poly in standing in. Is there an easier way of doing this? 2) I use a sort of bilinear interpolation to figure out the y(height) of the point in the poly that im in. This isn''t working right. I think bilinear interpolations can only be used for polys that are straigth rectangles, and not rotated ones. Again is there a better way of doing this? Thanks in advance Denis Lamarche

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!