How to "teleport" Character to location to sync animation?

For example, If I press “e” on a door, how do I teleport my character so they can be in the correct position so the animation syncs?

Please someone help, I am soooo ready to just give up on unreal, I cannot get ANY support.

To be frank, GameDev may not be for you if you are ready to give up on the first hurdle.

You should look into inverse kinematics, Or just forgo doing animation syncing for the time being.


I know gamedev, I know how to do it, I just want to know if UE4 is able to do it dynamically instead of the tedius way.

It has nothing to do with IK, I get what you are trying to say, but my question is specifically teleporting a player character to a World position to interact with a cutscene, which I know how to do, BUT Since Move component to only goes for Relative positions, how can I do that dynamically? Like what If I want that door 54 times in a scene? Would I have to go into each Door BP and change the location? Or is there a way to do it to where I can add a “socket” to where I need in the BP and just call the socket location and then have that be read by the Player BP “move component to”, so it can be read dynamically?

You can get the reletive difference between two locations but subtracting one from the other, And then either swapping the order or inverting the value depending on which direction you need it to go reletively.

You could do the teleport by setting the world position.


I don’t understand how getting the difference between locations would work in the dynamic way I’m saying?

For example

Door 1 has a socket where i link player at location 1,1,1,1.

Door 36 has a socket where I link player at location 4,4,4,4

HOWEVER in Door 36’s BP it still has the World position set at 1,1,1,1 because that’s where I set the first door. How would I have the “move component to world position” change dynamically?

That will work if you work in world space, There should be a node to get the world space location of a socket.
You can get the world space location of the socket by adding its reletive location to its actor location.


What exactly do you mean “adding its relative location to its actor location.”?

Say you have a actor A, and it has a component C.
Component C has its (reletive) location set to {0,0,100}, actor A has its world location at {100,0,5}.

So to get the world location of component C you would get world location of actor A, And then add the (reletive) location of component C: {100,0,5} + {0,0,100} = {100,0,105}
But that is only important if there is not a direct way to get the world location of the socket.


Ah I see.

Would my idea work:

In Door trigger blueprint > get socket location > plug socket location into Move Component To> Set move component to component to player character

Would that work ? Would it be dynamic because the socket location changes?

I don’t think so, But you can try.

Are you using the “Move Comonent To” node to get the player to move to the socket location of the door?

If so:
You will need to get the world space location of that socket and subtract that from the world space position of the player(or it could be player location minus socket location), That will give you the reletive location for the “Move Component To” node.


The move component To only uses Relative location, not World location. Why wouldn’t it work?

You need to use world location to find the location of the door relative to the player.

What that node is doing is moving the component the specified number of units, So you need to know the number of units to move.


I just don’t understand, why is that necessary? I can place a node in the world, plug it into my move component to bp and my player moves there no problem, why would it be different now?

Upbeat digestive device is primary requisite for appetite enhancement. human beings having gradual metabolism commonly suffer with lack of appetite or decreased urge for food because of slow metabolism the food consumed isn’t always digested properly and in presence of fallacious digestion even excretion of waste rely slows down.

I am unsure of how you used it before, A picture of the BP would help.

Based off the node doc entry, It is using reletive movement.
So you need to tell it what the difference is between the current location and the dest one.


I don’t have it up but here, see this vid it’s short.

he places node in world, plugs it into move component to.

I don’t have it up but here, see this vid it’s short.

he places node in world, plugs it into move component to.[/QUOTE]

I think I now understand what you are trying to do.

I would add a function to the player that accepts a location as the target that will be plugged into the reletive location.
Then all you have to do is have some kind of managment system tell the actor to move to the location, The manager would get the socket location of the door.

I think a cleaner to do the line up for door animation syncing would to use the line trace result of pressing the “E” key (I assume you are doing a line trace) and then cast the hit actor to the door and call a function to get the location of the socket and feed that into the move component to node.


What I am trying to do is basically this video:
Why would I need a line trace? Wouldn’t Move component to location and rotation work?

I assumed that was how you were handling interaction with the world.

It should, You just need to get the sockets location for the moveto.
You should pass the socket location to the move to when you press the “E” key.