Jump to content
• Advertisement

Public Group

need help (collisions and rotations)

This topic is 4481 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

hi there. im trying to make a simple 3d futuristic racing game using an implementation of OpenGL on the nintendo ds. before i create anything detailed im trying to get the movement of the main racer correct. ive created a model of a ship which should now be checked against the level for correct rotation. for collision, im thinking i have to calculate which polygon in the level the object is over, and then match the objects rotation (its local axis) to the plane of the polygon its over (so i have to change the objects axis according to the polygon). then i want to be able to rotate in the objects modified y-axis with key presses (direction) and move through the objects z-axis. so i was thinkin of storing a list of some sort for each polygon in the level with details on its rotation and its boundaries that the object has to pass to be able to say "its over this polygon". would this be too complicated? any tips? also what would you say the best way of matching the objects rotation with the polygons rotation is? any tips? (ill be using either quaternions or axis-angle) cheers [Edited by - Rajveer on August 11, 2006 2:58:07 PM]

Share this post

Share on other sites
Advertisement
can anybody help?

Share this post

Share on other sites
first of all, this issue has nothing to do with OpenGL at all. Secondly, why would you ever want to base your player's rotation on the geometry of the level? These should be completely seperate. Imagine for a second, if you have some weird unseen flaw in the geometry of your level. This will, in your system, be reflected in a flawed rotation of the player. There is absolutely no reason to base the players orientation on the geometry.

You may be thinking of path finding or a something similar. If this is the case, you should still be extrapolating your geometry from your nodes (the points to which the player must travel to acheive the proper path).

Share this post

Share on other sites
cheers for the reply :)

Quote:
 Original post by Morpheus011why would you ever want to base your player's rotation on the geometry of the level? These should be completely seperate. Imagine for a second, if you have some weird unseen flaw in the geometry of your level. This will, in your system, be reflected in a flawed rotation of the player. There is absolutely no reason to base the players orientation on the geometry.

id want to base the objects rotation on the geometry of the level because i want the object to "stick" with the ground and rotate properly around it. once its rotated properly against the polygon, then movement will simply be a movement along the ships new local z-axis. how do you mean that they should be separate? how else could i get the correct rotation for the ship? in any case, how would you recommend modifying the ships local-axis to fit geometry?

Quote:
 Original post by Morpheus011You may be thinking of path finding or a something similar. If this is the case, you should still be extrapolating your geometry from your nodes (the points to which the player must travel to acheive the proper path).

yep thats what i mean :) (calculating the right path for the user to move along). when you say extrapolating the geometry from the nodes, do you mean keeping them separate? (i think im getting what you mean by separate now)

EDIT: maybe i should add that the only geometry i plan on adding atm is a simple 3d course which will twist and turn

[Edited by - Rajveer on August 11, 2006 1:47:39 PM]

any help?

Share this post

Share on other sites
no-one? :( im thinking of a ray casting collision detection with a ray emanating from the objects position, checked against the normal to the plane of the levels polygons, but what if many polygons share the same plane?

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5
• Advertisement

• 11
• 9
• 12
• 14
• 9
• Forum Statistics

• Total Topics
633350
• Total Posts
3011473
• Who's Online (See full list)

There are no registered users currently online

×

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!