use a specific target to move to by using click

hi guys , so i wanted to know how to set up a simple blueprint system in first person for moving towards a specified target by click ?
i would like to set up an actor target as that would enable me to click on multiple actors in the level to move to rather than a specific mesh target , thank you

This function traces from the mouse location and if it hits any actor, gets a navigable location near it and move there.

hi , i have set this up , but it’s not interacting with the actor i’ve placed in my level , like do i have have to set up something inside the actor bp as well for this to work ?
sorry for the trouble cause i’m learning blueprints.

My bad, forgot about that.

The actor should have a component that has collision enabled on the channel selected in the Line Trace node. (In the above screenshot it’s set to a custom “Interaction” channel, but the default “Visibility” channel should work.)

The component could be a Static Mesh, Box Collision, Sphere Collision etc…

could you kindly share a screenshot like you did above , thank u

hi , could you kindly show me a screenshot of the nodes of the above-mentioned collision setup , because i’m kinda stuck .

The collision setup depends on what kind of actor you need to hit. So could you post a screenshot of the actor you placed? also a screenshot of the components tab of the actor.


Couple questions to clear some stuff up.

  1. Do you have a Nav Mesh Bounds volume so that your character can move using AI Move to?
  2. Is the Visibility channel set to Block in the collision settings of the Static Mesh component in the actor?
  3. What exactly happens when you call the Interaction Trace function?

Also, could you post the screenshot of the Blueprints you made from my screenshots?

yes i have a nav mesh bounds volume in the scene covering the entire area where i want the movement to happen .

i don’t quite get the 2nd and 3rd question .

In the actor blueprint, when you select the Static Mesh Component, in the details panel there should be a Collision section. In there make sure 'Visibility" under Trace Responses is set to Block. (If it’s grayed out and not clickable, you’ll have to set Collision Preset to Custom.)

image
This screenshot is from UE5, so the UI might be a bit different on UE4.


How are you handling mouse click in the character blueprint? How are you calling the Interaction Trace function?

What I mean is, Do you have input bindings setup in the project settings for Clicking? and are you calling the Interaction Trace function from that Input?

image
Project Settings → Input → Bindings

image
Character Blueprint Event Graph

it is still not working , i did like u said , do you want me to send the file?

Sorry, don’t know what the problem could be.

You could try this :

1 Like

this solved it , thank you for your help , i really appreciate it.

1 Like

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