How to create a top down movement system like Diablo

I’m trying to create a movement system for my character, I’ve managed to set it up so that when you click, they move to the mouse location and if you hold, they keep moving to the mouse location. My issue is that if I hold the mouse down, when I release it, I want the player to stop, but they keep moving to the location and then stop.

You can just stop movement before closing the gate.

Also, you can use a distance node rather than subtracting and getting the length.

So that works great for holding it down, but now it won’t move if you just click once.

In that case I’d recommend just using the enhanced input system. You should be using it anyways- the type of input you’re using is only supposed to be used for debugging.

But here’s how you do it the messy way:

Thank you! I did take a look at enhanced inputs but I’m doing it for a solo gamejam and it was a bit too complex for me. But afterwards I’ll definitely look in to it.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.