Move AI to Mouse Hit Location?

Hey all, going crazy on this one as I’m fairly new to Unreal (coming from Unity). For the life of me I can’t figure out how to simply detect a mouse click, check to make sure it’s on my navmesh, and move the Character there. Blueprint attached (I don’t get any log right now), any step in the right direction would be amazing!

I would suggest looking into the top down example that comes with this function.

Make sure you have “Enable click events” on in your controller
det

Thanks I’ll try it! Does this take into account the navmesh? Also, I just copied the third person character BP which inherits from character, do I need to change the parent class to get the Mouse Interface options? FYI I’m using an input action node to handle input, doubt it matters.

If you are using the third person template then I believe they might be off. It’s on in the top down template for comparison.

Yes the character ai uses the nav mesh when ai move to is invoked.

Enabling mouse events should be sufficient.

1 Like

Thanks @3dRaven ill report back

Thanks again @3dRaven - looking at the top down example I was able to fix all of my issues. Now just to figure out how to get gamepad working with this too haha

@Invictvs1 I actually replied to a message regarding movement combinations of mouse and keyboard / gamepad. It’s not too complicated. I’ll see If I can find the old project.

Amazing thank you!


This should get you both mouse click to move + gamepad movement.

You can copy over the axis configurations for the input from the third person project. Just name the MoveForward & MoveRight so the events can sync up.

1 Like