Topdown template using the movement controls

Hi,

I don’t understand how the movement from the topdown template in blueprints works.

I’m trying to:

  • rotate the player in the direction of the monster, when attacking
  • if out of range to attack, first move the player towards the monster, or moving towards an interactable object when clicked

there is a “click and go there” section in the TopDownController blueprint but I don’t know how to call it, and I also don’t know how the topdown template rotates it’s player towards the mouse, so I can re-use that to rotate my player towards a monster when attacking or rotate and move towards an interactable object.

any ideas?

Thanks in advance!

I figured it out. I ended up writing my own code entirely instead of trying to re-use the logic of the topdown template. There was no way to call the function, it just does Move to Hit Location when pressing the left mouse button.

So I wrote a complex code with distance checks, target tag checks etc… to handle movement, and then I added rotating towards the target when attacking.

The code of rotating towards the target can be seen in the added screenshot. The code for movement is too complex to post a screenshot about. Hope this helps other people as well.

Can you post the full BP of this, i’m having the same problem, the character can move to target but need one more click to performe attack animation.