Move two different actors together

I’ve just started to learn Unreal 4.26.2 and I developing an Arkanoid clone just for fun (and to learn).

If you remember the game, you can move the paddle and the ball together when the game starts. Both are different actors because, after that, they move separately.

The only way to do it that I can imagine, is to get a reference to the ball in the paddle and, when the player move the paddle, use the same input vector to move the ball using a ball’s method. But, because I’m new in Unreal I don’t know if there is another way to do it.

How can I move two actor like they were attached?

By the way, the paddle is a Pawn and the ball is an Actor.

1 Like

Your idea is reasonable and if you can get that to work then that would be a solid solution.

There is an inbuilt function in actors called “AttachToActor”. It will probably be easier to use that. Create a socket on the paddle where you want the ball to be, and just detach the actor when you need to.

2 Likes