# Implementing Player Gliding From an Triangle

This topic is 3078 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
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 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 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.

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633662
• Total Posts
3013228
×