- Home /
Leave a mark on clicking point of click to move
i cant figure out how to place a mark(like a green dot) on the place where you click with your mouse. so how can i make a mark of where the player has clicked and gets removed when the player is at the location or has clicked on a another spot.
Answer by fluxhackspro · Feb 18, 2018 at 08:32 PM
Simple, use raycastHit and set the players move destination to the hit.point (and convert to transform). And to remove the green dot you can use Vector3.Distance to get the distance between the player and the green dot. When its low enough remove the dot.
Your answer
![](https://koobas.hobune.stream/wayback/20220612152909im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Continuously rotate a gameobject on 1 axis perpendicularly to another gameobject's normal? 1 Answer
Vector3.Movetoward. Why does this work? 0 Answers
Object Movement via Mouse Click? 3 Answers
My Raycast acts like it's hitting something when it isn't 0 Answers
Making object found with raycast a child of the object the ray is cast from 1 Answer