Download

Controller location of an actor by clicking another actor with mouse

I am trying to make a rope game. When i first click the first mesh to activate the position change, second i need to click the second mesh wich i want to move the first one on it.

When i click on the second mesh my print stricg is working but i can not change the location of first mesh, i can change the first meshes location by blueprint of itself.

You have to identify the location of the mesh you click.
It really depend if: you have a big actor with more meshes, or every mesh is in another actor.
I leave you an answer i sent some time ago,
That move an actor , toward another actor you click.

WHy this easy script is not working, I am trying to move CylinderCharacter by clicking the staticActor

I tried this also, it works with event tick but left mouse click and Left mouse click is not setting the move variable, i also try gate, nothing changed, left click is useless. :frowning:

@elessartkoxc
Left muose is not working? how do you tell? use a print node to the click.

quoting an answere here ""what is difference between On Click(object) and Left Mouse Button? - Blueprint Visual Scripting - Unreal Engine Forums

Left Mouse Button detects when the local player is pressing its left mouse button, regardless of the mouse’s position. In order for it to work, the actor receiving the input must be setup properly to listen player’s input (Player Input -> Player 0 in its settings I believe).

OnClick detects when the mouse cursor of the local player has clicked on the actor. In order for it to work, the actor must have a collision channel blocking the mouse cursor collision channel (setup in the Player Controller).

Than you are moving a component that is visible? capsule component are often invisible. moving that component will move only that and his childs.
Try moving the whole actor with this SetActorLocation | Unreal Engine Documentation