New Input System: 2D top-down RPG OnMouseDown(0) 'player move to mouse position'
Hi there, I have searched for a solution to this problem and tried out different things but I understand too little about c#.
I am playing around with unity to make a simple 2D top-down RPG-style game.
Tutorials helped me get the WASD player movement working with the Input System. However, I can't seem to find a solution to make the player character move on mouse click. Here's what I envision:
If the mouse is clicked at a certain position on the screen, the player character should move to this position. (Also I wonder what(if anything at all) would happen with such a script if the character walks into a collider)
If anyone could shed some light on how to achieve this, help would be greatly appreciated.
Your answer
Follow this Question
Related Questions
2D Top-Down Shooter Glitch With Camera Focus 0 Answers
I am creating 2D top down shooter game but i am stuck at the movement. Help! 1 Answer
Movement Based On Direction Player is Facing 1 Answer
[2D] How to stop 2 vectors from adding force on each other 0 Answers
Player only moves when the key is pressed, not when it's held. 0 Answers