Jump to content
  • Advertisement

Archived

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

Oldfella

Sliding through corners

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

Gidday, I have implemented collision reaction in my Engine, using a sphere for my Player/Camera, I find the colliding triangle and normal, create a sliding plane ect - this so far works well. Sliding is smooth, and so far no failures. My problem is, if the players sphere is sliding against a wall inside a room, and slides into a corner, it continues to slide straight through the corner/walls. Any Ideas on how to fix this , or what to look for ? The collision detection is detecting a collision in the corner, but it appears the sliding plane is causing the failure. Any Ideas appreciated Take Care.

Share this post


Link to post
Share on other sites
Advertisement
There are 2 things that I can think of:
1. That you are only going through one collision test and not retesting your recalculated vector segment(s).
2. That you are pushing your object away from the wall by a tiny delta so that it doesn''t become stuck to it. This can have the unpleasant side effect of pushing the object through an adjacent wall that is at a steep angle to the first collided wall (ie corners). If the object is pushed through the other wall, it will never intersect (collide) with it.

Share this post


Link to post
Share on other sites
Hi SoulSpectre,
Thanks for your reply,
Your second Idea helped me diagnose the problem.
Although I can slide Ok, most times the sphere dos''nt get pushed away enougth to give a non collision result.
The funny part is, some objects it will push back enougth to stop the collision, and on the same object, but other side, it won''t push back enougth.
This points to my normal/plane calculations.
I am checking these now.
As far as I know, my poly soup is ok that I am reading in.

Take Care.

Share this post


Link to post
Share on other sites
No luck yet
I slightly increased the Offset, this pushes the sphere back just enougth to stop collision.
Sliding remains smooth, but the sphere still gets pushed trough corners.
Each loop tests for triangle collision, I am using the free Coldet Lib for Detection, and dos''nt seem to be failing, as I am using an onscreen readout to help with collision debugging.
The sphere is being pushed through the corner whielst a collision is being reported.
Any other Ideas appreciated.

Take Care.

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!