I’m working on dash ability, and I’d like the unity engine to take care of the object positioning after the collision is resolved.
My current approach is as following;
- I press the SPACE key to trigger ability
- I disable the collider of the player
- When dash reached the calculated position I then reenable the collider
At that point, the collider is re-enabled inside another collider and the player gets launched into the opposite direction (sometimes it gets launched into World’s forward direction). I’ve attached a gif to illustrate the issue.
Any ideas as to why this is happening?