Collision handling- corners & jumping

Started by
3 comments, last by Ussyless 10 years, 3 months ago

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

R3j5zSE.jpg

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?

Advertisement

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 :)


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.

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

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

KInzn7v.png

This topic is closed to new replies.

Advertisement