Getting the position of ActorA and passing it to ActorB?

  • flag the button we click as isVariable:

image

  • inside the CAR actor that has the widget component:

The above translates to: whenever we click this actor’s widget component’s button, move the currently possessed Pawn to this actor’s location.


No need for any script inside the widget.

1 Like

Really?
Thank you I tried adding code to the actor but it didn’t work

I will know that you can do this
Thanks again for pushing me out

1 Like

I’m sorry I may have translated it wrong
There is an actor in which there is a widget for 3d visualization (CNT)
and there is a CAR in which you need to move the pawn
When you click on the widget that is clicked in CNT the pawn moves to CAR
and also for some reason I couldn’t connect

If I did something wrong I apologize

If it’s still not clear I’ll try to explain and show you how I can

You may need to explain from scratch which actor owns the component and which actor needs to send the pawn where.

  • there is a CNT actor with a widget component (where? in scene?)
  • there is a CAR actor that we move the pawn to (in the scene)
  • there is a Pawn spawned by the Game Mode, or placed in the scene.
  • we operate the widget and have the CNT’s widget’s button move the Pawn to the CAR actor’s location

Am I getting close?

1 Like

Located on the map ((location)level)
Yes it contains a widget

Yes, you think so.

The pawn is set to a level location etc it is not made through a game mod

The widget is located in CNT and when we click on the widget the pawn should move to the location (vector) of the CAR

I hope I translated everything correctly, and I apologize.

1 Like

If anything I’m working on the engine version 5.4

1 Like
  • in the CNT actor, create an actor variable of CAR type, flag it as Instance Editable
  • select the CNT actor in the scene, in the details panel pick which CAR instance the variable should point at
  • have this script inside the CNT actor instead
  • but instead of Get Actor Location (self), Get CAR → Get Actor Location