Getting the position of ActorA and passing it to ActorB?

How to get the ActoraA position and pass it to ActoraB please help

  1. this is a widget
  2. to make actors instances talk, you need to know:
  • where they are
  • what they are (just regular Actors?)
  • when they need to talk
  • why they need to talk
  • how they make it into the game

Communication is circumstantial, how to do it depends on what is going on.


If you prefer to crack it on your own:

1 Like

Oh sorry yes it is necessary to give the place position of ActorA in the widget

The Guides that Everynone linked to are no doubt good and would teach you what you need to know, I recommend you read them.

But interfaces would be the ideal way to send data to actor a to actor b, you should avoid hard references if using interface since that is one of their major benefits over casting.

If you won’t avoid hard references then the simplest way is to just use casting (e.g. the cast to node).

An even easier and more efficient possible alternative to both of these, is using tags.

Here’s more about hard and soft references, it can be tricky to wrap your head around.

However ultimately in your case, you just need the actor position. This is an easily accessible value and what you’re doing in your original post is an example of how that could be done, not really sure what the problem could be for you…

This here is an ugly alternative way (mostly because it creates a hard reference, however above video will teach you how to make it a soft reference instead) but easy way to do what you want.

1 Like

Thank you


What is it, is that the answer to my question?

it’s an answer yes. I gave you many.

1 Like

I’m sorry but I don’t understand what needs to be done I tried all the suggested options but not one of the listed ones worked

Neither do we - that’s why you’re getting generic answers. Read my post again and please explain, in detail, what needs to happen. Look at the listed bullet points and provide info for every one of them if you need direct help. There is no one solution for all cases - you choose a method of communication based on what needs to happen and what is currently in the scene.


Otherwise you will need to read and understand the documentation and follow tutorials.

1 Like

I created it using this guide

3D In-Game Interactive User Widget in Unreal Engine

I am creating a 3d widget that should move a pawn controlled by a player to another actor
What I wanted to get: when you click on the widget, the pawn was placed in the position of the actor who is on the level

1 Like

When, where, how?

That’s the car, right?

1 Like

When a pawn clicks on a widget it should be moved through set actor location to the position of an actor that is already placed on the same level as the widget in advance

Good info but the question is: when, where, how do you create the widget? Does the player pawn have the widget component?

1 Like

Yes
CAR is an abbreviation don’t think it’s a Car

1 Like

Haha. Fair enough, my bad! So:

  • we click a widget button and move a pawn to the object that is the scene, right?

We just need to know where the widget is.

1 Like

The widget is located in the actor
The player and pawn do not have a widget
the pawn has a component for interacting with widgets

1 Like

Got it.

The actor we want to move the Pawn to?

1 Like

Yes I want to move the pawn to the actor CAR

1 Like

Well sort of

I need to get the position of CAR and after clicking move the pawn to the same position.