How to implement mouse click move to location (intended for singleplayer)

In this tutorial we will implement a mouse click move to location mechanic.

1. In the player controller bp create a new function “MoveToMouseClick”
tss_mouse_click_player_controller_01

 

2. Still on the player controller, add this to its Event Tick
tss_mouse_click_player_controller_02

 

3. Now open the character blueprint, and recreate this logic (connected to the left mouse click, instead of WeaponFire)
tss_mouse_click_player_character

 

That’s it, the character will now move to where a mouse was clicked.