4 ms·
Good game, but unfortunately I was able to get stuck on an edge. Player's upper left edge caught on wall's lower right corner. Perhaps the problem is in the col
by bArray 8y ago
Good game, but unfortunately I was able to get stuck on an edge. Player's upper left edge caught on wall's lower right corner. Perhaps the problem is in the collision checking: https://github.com/phoboslab/underrun/blob/master/source/entity.js#L32 https://github.com/phoboslab/underrun/blob/master/source/ent...
If there's a collision in either X or Z, both should be rolled back to their last positions. I think there is possibly an edge case hidden in there otherwise.
P.S. Nice code by the way.
- MrBuddyCasino 8y ago> I was able to get stuck on an edge. Player's upper left edge caught on wall's lower right corner Same here.
- phoboslab 8y agoShould be fixed with https://github.com/phoboslab/underrun/commit/2477c5a45f5be4db10be21f7afb37b32600b67f1 https://github.com/phoboslab/underrun/commit/2477c5a45f5be4d... Rolling back X and Z when any collision occurs would prevent you from "hugging" (i.e. sliding along) walls. The problem was that a near corner collision wasn't correctly detected when the player didn't collide in X direction in the last frame (last_x) but does collide in the current frame (t.x), allowing the player to move into the corner in Y direction. Thanks!