Jump to content

  • Log In with Google      Sign In   
  • Create Account

Collision handling- corners & jumping


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Ussyless   Members   -  Reputation: 142

Like
0Likes
Like

Posted 07 January 2014 - 01:06 AM

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?



Sponsor:

#2 brucedjones   Members   -  Reputation: 509

Like
0Likes
Like

Posted 07 January 2014 - 10:29 AM

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, 07 January 2014 - 10:30 AM.


#3 DT....   Members   -  Reputation: 487

Like
1Likes
Like

Posted 07 January 2014 - 04:36 PM


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...., 07 January 2014 - 07:30 PM.


#4 Ussyless   Members   -  Reputation: 142

Like
0Likes
Like

Posted 07 January 2014 - 07:13 PM

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



#5 Ussyless   Members   -  Reputation: 142

Like
1Likes
Like

Posted 07 January 2014 - 10:24 PM

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


Edited by Ussyless, 07 January 2014 - 10:29 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS