Open Darthfett opened 12 years ago
Right now this is a very hard problem to solve, due to the multiple sources of acceleration, and multiple sources of resting cases. A very common situation, is how to deal with a square object resting upon a flat object -- two points of contact creates two separate events/points in time which need to be resolved correctly.
A simple way to solve the issue would be to simply keep each source of acceleration separate, and re-calculate combined acceleration affected by resting objects. This wouldn't be very efficient, intuitive, and could potentially have issues with scenarios that are not solvable (such as resting against two objects which are squeezing an object together).
With the resting state affecting acceleration, the previous solution to enable/disable a source of acceleration by adding/subtracting a constant vector does not work.
For example, if the player is holding acc-left, and enters the resting state when going up a ramp, acceleration will be incorrect if the player releases acc-left.