How to move an actor in a scene from another BP (not the Pawn)

i think you need the mesh to “cast to other thing you want to move” in second your blueprint.

Hi everyone !

My problem is simple : I would like to move an actor to another location (with SetWorldTransform) from another BP.

On game start, this other BP is fetching all actors needed using tags and cast them as Rewindable Actor (which is an interface, and of course all the requested actors should implement this interface). I’m saving these actors into an array like the following :

Later, I would like to loop over this array and give my actors a new position. Since those actors implement the interface, they have to implement a function that gives me access to their mesh (remember this, as this is my mistake). Using their mesh, I can call SetWorldTransform to give them a new position in the scene. Like this :

258436-settransform.png

But here is my mistake. I’m not moving the actor but his mesh. The mesh is then in the right place but the real location of the actor is different.

My question is really simple : How can I move the entire actor (aka the Scene Component ?) instead of the mesh alone?

I’ve tried to get the parent of the mesh, to return ‘self’ instead of the mesh using the interface (so an Object Reference) and other things.

The thing is this script can be applied to 2 different actors (actually, Player and AICharacter). AndI don’t want to script this cast explicitly, this is why I’m using an interface, I think I don’t have to know which object I’m moving. But maybe this is not possible ? (I mean, not like this).

And even if I cast my actor, SetWorldTransform is applied to only ! component of the casted actor. When I had the node SetWorldTransform, I only those choices : SetWorldTransform(Mesh), SetWorldTransform(ArrowComponent), SetWorldTransform(InteractionBox) so I think in the end this is the same ?

But thanks a lot for your answer !

well…i would add a branch wich checks what type of actor is affected and then cast it to both actors but only one at a time ?..