Sign in to follow this  

Finding right vector to resolve collision

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

Hey guys

 

Recently I read this papers about Separating Axis Theorem http://www.metanetsoftware.com/technique/tutorialA.html

 

So, I started to write my own physical engine, but there's trouble on my way:

 

4q_.jpg

Here's "player" (shown as blue rectangle) ovelaying two wall blocks (shown as green rects). Player's speed vector shown as red arrow. According this (http://www.metanetsoftware.com/technique/tutorialA.html) "player" sholud be extruded along axis with minimal overlay value. Finded extruding vector for object "B" seems to be logical, unlike object's "A" vector. The problem is that if "player" moving along the wall it start to twitch down when collision like that happens.

 

I have an idea to move away "player" in reverse direction of its speed vector somehow. But still I need to find right normal to collision side to resolve impulses.

 

What can I do?

 

sorry for my broken language

Share this post


Link to post
Share on other sites

You could find out what edges are internal to the geometry and mark those so they are ignored in collision.

 

Another thing I would recommend anyway would be to make your character collision shape a sphere or a pill shaped. Having rounded edges will help your character slide over edges. This will help prevent the player from getting stuck on small bumps.

Share this post


Link to post
Share on other sites

This topic is 1117 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this