#### Archived

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.

## 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

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
14
5. 5

• 14
• 10
• 23
• 9
• 33
• ### Forum Statistics

• Total Topics
632632
• Total Posts
3007541
• ### Who's Online (See full list)

There are no registered users currently online

×