Jump to content
  • Advertisement
Sign in to follow this  
ajm113

Implementing Player Gliding From an Triangle

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

Hello everyone, I've been studying up on my physics and I've learned too implement bounding box collision and a some what working Octree system for now for my level loader, but I get the point of all of that, now I want too go into triangle collision for static 3D models.

I just want too know is how can I apply a "glide force" with a 3D triangle? I'm sure this also refers to terrain collision, but I'm not sure what too call "glide force" in more of a science term. I want too know so I can Google this up better if it's difficult too explain off the bat.

Thank you, Ajm.

Share this post


Link to post
Share on other sites
Advertisement
This isn't very clear. By "glide" do you mean you want the object to slide along the triangle without passing through it? (When I hear the word "glide" I think of a smooth, nearly frictionless motion, but it can refer to a more specific activity, "gliding" in the air for example in an unpowered sailplane.)

Share this post


Link to post
Share on other sites
Oops sorry, I mean glide as in if the triangle is in any way tilted the object will glide down it if it's steep. Just like terrain collision if a hill is too steep the player/objects will glide down the hill.

I'm just confused how I can determine the direction of which the player should glide if a vector is higher then another.

Share this post


Link to post
Share on other sites
Generally this is referred to as 'sliding' (if you search the forum archives for e.g. 'collision sliding', you should find quite a few threads on the topic).

The short answer is: project the velocity/displacement vector onto the triangle plane, and that is your new 'sliding' velocity/displacement vector.

The details of an actual implementation can get fairly involved, but that's the basic idea.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!