# Platformer Physics - what to do with multiple resolves?

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

## Recommended Posts

I've got my platformer physics using SAT.
I'm setting up the later parts of the system, namely setting the order of things.

Step Begin
Velocity logic (player controls, Acceleration, gravity, etc.)

Step Middle (running parallel with logic that does not modify velocity or position)
Check with velocity, world collisions.
Calculate new velocity (stays the same if no collision)
Check with both new velocities, object collisions (I do project the shapes as if they were elongated in velocities direction, so fast moving objects are accounted for)
Calculate new velocity (stays the same if no collision)

Step End
Move object,
Run logic in need of updated position (parallel: Update broad-phase grid system.)

I'm stuck on Calculate new velocity because I have multiple resolves from the world collisions.
I didn't want to do it one by one because if one resolves into another world piece which resolves into another world piece, etc. you could end up hitting things you weren't going to hit with your intended velocity.
But now I'm not sure what to do with the list of resolves.

Any and all help is appreciated,
Bombshell

##### Share on other sites
Sounds like a problem of over-compensation: http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/

##### Share on other sites
I'm assuming the contact normal is the normal perpendicular to the smallest resolvable intersection?
But I'm still a bit confused.
I'm assuming it works by getting the shortest distance for object A to move without intersecting object B.
Then checks if the current velocity travels further than necessary, if so apply new velocity, else leave alone?
I'd just like to make sure I have the concept right, always helps to know how the code functions before implementing it.

1. 1
Rutin
25
2. 2
3. 3
4. 4
5. 5

• 10
• 13
• 19
• 14
• 9
• ### Forum Statistics

• Total Topics
632943
• Total Posts
3009352
• ### Who's Online (See full list)

There are no registered users currently online

×