Jump to content
  • Advertisement
Sign in to follow this  

Collision routine - push or precalculate velocity or oldpos / safepos

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



I am pretty confused about what routine to take when trying to create a 2d scroller game.

I want to use a rectangle as bounding box and i want to have all kinds of angles and rotating objects, elevetors etc.


right now i like "the move -> get penetration delta ->push back" concept, this is the one i get to be stable without jittering. And with recursive checks this works great in small corners etc. Also other moving objects "pushes" the player for "free"


If i try to sweep and get the TOI and change the velocity to sliding for example, this always gives me jitters and jerkiness.

The same with the oldPos vs newPos when saving position and then check for collisions and if found, then revert back to the safe position. This i also get jitters when implement. Should i still be doing the "push-back" even if i calculate the TOI?



What is the "standard" way of doing when creating a FPS in 3D and in my example 2D scroller.


The problem with the push right now is that i get sliding from the gravity vector even though my velocity is set to zero, this is due to the pushback vector. So this is why i want to try something new, otherwise i really like that technique.


And if you were to do a 2D scroller with different angles for floors, would you use AABB and then line intersection?

I am checking the minkowskis sum, but i think there might be simpler stuff for the scroller.



I am stuck with prototyping right now and cant get progress, so any input is helpful =) 

Edited by KurtO

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!