[ad_1]
I’m making a easy MOBA recreation. I’ve carried out AABB swept collision detection for participant and projectile motion and it really works nicely. It really works by computing time of intersection, so the AABBs by no means truly penetrate.
Now I am excited about find out how to assist a Blink/Flash/teleport capacity, permitting the participant to instantaneously transfer to a different location. Now there might be penetration if the participant teleports right into a wall, and I am on the lookout for a great way to resolve collision.
Here’s a video from the sport Brawl Stars displaying how I would prefer it to reply when teleporting into partitions. You may see that when teleporting over partitions of various thickness, if the wall is thicker than the space the participant would teleport, the collision will get resolved properly, shunting them off to the facet (0:18) or within the path they had been going (0:15) if there may be sufficient distance left, or not permitting them to maneuver in any respect (0:29).
It appears there may be a way of discovering the closest tile to the place the participant would find yourself at, they usually get moved there as an alternative. Is that what’s going on?
If not, can swept collision detection be prolonged to deal with this? I might guess not, in that case, how can or not it’s carried out?
That is extra of a conceptual query, for the final method. I haven’t got any working code but.
[ad_2]