4 ms·
Would it work to have a different response to collision, namely to apply a reverse of your last step? (A full reverse or partial). There might still be corner
by jbert 13y ago
Would it work to have a different response to collision, namely to apply a reverse of your last step? (A full reverse or partial).
There might still be corner cases, but it would seem to resolve the described issue, since irrespective of where you think the other player is, if you both reverse your motion you should disengage.
I can see 3-body problems being more problematic, but that's probably also the case with the original code.
- placeybordeaux 13y agoWith their example code if lonestar is walking to the right and froggy precives that they land on the right side of lonestar, but lonestar precives that they landed on the left of them, then they would both slide to the left if they just undid their last step.
- gpvos 13y agoYes, and that would make it so they would not collide anymore, so I'd be interested to know why they did not use that solution. Probably it would also give a wrong feel in gameplay.
- placeybordeaux 13y agoIf they both slide to the left then they would still be in a collision.
- gpvos 13y agoOkay, because of lag they might have to retrace more than one step. But eventually, they would have gone "back in time" enough to disentangle, regardless of their direction.