I have a 2D player gameobject that uses Rigidbody.MovePosition to follow the mouse. I have a pause menu that pauses the game by setting Time.timeScale = 0
. This allows the player to move their mouse somewhere while the game is paused, and then when they unpause it, the player teleports to the mouse.
This allows the player to pause, move their mouse to somewhere where it is safe, unpause, and dodge any enemies. From my testing, however, if the enemy is in between the mouse and the player when unpausing, the player still collides with the enemy, but it won’t if is trigger is set to true.
Is it possible to stop the player from teleporting after unpausing, and if so, how?