Hi everyone, How can I make a character controller that when a player clicks on the screen the character will move to a given position on the X Axis and when the player clicks the screen again the character will move back to its original position on the X Axis and that will just repeat when the player clicks continuously.
To make it clear there is only 2 specified position for the character for example:
The original position of the character on the X Axis is 1.65 when the player clicks the character will move to -1.65 and when the player clicks again it will move back to 1.65 and when clicks again will move again to -1.65. That’s what i’m trying to do. Im using Input.GetMouseButtonDown(0).