I've been struggling quite a while with a very annoying precision issue.
Here's my case:
- player/ mesh gets a predicted change in position
- collision is checked
- if no collision, player is moved (change position)
Now in step 1 the velocity is calculated using deltaT, and in step 3 the same. But due to precision changes (I think), in rare occasions the player gets stuck in corners where they shouldn't (don't think it matters, but I do aabb collision checks).
What's your advice on this?
I also tried to switch to move always and undo last movement when collision occurs, but although possible, isn't optimal because after collision checking there are several other parameters that 'decide' if the player should move and in what direction.
I also tried to use a "local deltaT", saving it in the beginning of the update function and reuse it for steps1 and 3. But no luck so far.
Any input is appreciated