# Collision handling- corners & jumping

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

## Recommended Posts

greetings, i've drawn a diagram to explain my problem

so basically, my problem is, when jumping up into, or dropping onto a corner, in some situations, it will overlap too much in the Y axis, so it will be handled by the X axis, my system basically compares which one is overlapping the least, then takes action based on that

i'm wondering if anyone has any suggestions to stop this happening, perhaps somehow bias it towards parallel surfaces, or based on the speed of the  object

multisampling could work somewhat, but i was hoping for a more refined solution that won't use so much power

any ideas?

##### Share on other sites

One simple, but more expensive solution, is to reduce the time step for the particle close to the wall. This way the particle will move less between time steps, decreasing the likelihood of the situation you described.

Edit: actually this won't help. Sorry :)

Edited by brucedjones

##### Share on other sites

i'm wondering if anyone has any suggestions to stop this happening ... or based on the speed of the  object

That sounds right.

You may want to investigate continuous collision detection.  Incorporating speed or velocity should give you a "first time of impact" along the y-axis.

Edited by DT....

##### Share on other sites

Greetings, yeah, i just tried basing it off of the speed (overlap / speed), so for example, if the y overlap is 3, and the yspeed is -5 (abs 5), and the x overlap is 1, and x speed is 1, it will do

if (3/5 < 1/1 handle that axis first), this is showing some interesting glitches when jumping while moving fast into a roof though, i'll try to isolate the cause, i have a feeling that i could combine both approaches somehow to fix that, not sure yet

##### Share on other sites

So i've created a functional example that i can play with, and monitor results, see what happens by giving it certain variables (before i was using a platformer type system i had made, and it was hard to see exactly what conditions were causing glitchy collisions)

anyway, as you can see in this picture, it seems to be working for now,i think i'll have to put it back into a platformer example so i can experiment with it

edit: also, the green line is the movement vector

Edited by Ussyless

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 9
• 15
• 9
• 11