- Home /
Anyone have a 'click to move here' character controller script?
Hoping to save myself some time: I'm looking for a script that works with the Locomotion system, probably a 'motor', that will find the point on the ground where the user has clicked the mouse, and tell the character to go there. Anyone know of such a thing?
Your stated requirement is too generic. Click... on a tagged floor colliders? On terrain? Also, how should they moved -- A-Star style? Directly? Physically? With easing? It's ultimately a creative decision that will need to be tweaked, you won't find an out-of-the-box solution.
I would start simple: click on an point (preferably on a horizontal-ish place) and it LERP's there at a given speed. Can add easing and such later. Using Locomotion, it would use the walk animation, turn if needed first, then idle when destination is reached. I've been mashing together some stuff I found around and at the script wiki, nothing working well.
Answer by DaveA · Nov 05, 2010 at 08:00 PM
This link is no longer valid, can I please get that script I am trying to figure out how to implement this into my own character controller script. Thank you.
Thank you for that, turns out that is not what I need. I thought it would be using a Character Controller collider component, not the Character $$anonymous$$otor component. Any idea how to use the position of the mouse click from the raycast to use the controller,move() or even simple$$anonymous$$ove()?