How do I Teleport AND change velocity direction to match?

I want to be able to Run → Jump → Teleport → have the jump continue based on the teleport point facing direction.

Example:

Character is running south, jumps and is teleported to a telporter facing North, I want their jump velocity to move them north.

What happens now:
When the character teleports even though their rotation is changed to face north they are still traveling south.

get ( physics linear velocity–> length )

this will give you the magnitude of the speed

after teleporting get the facing vector. normalize ( normalize is set its lenght to 1 )
multiply by( velocity–> length ) before teleporting

then set physics linear velocity with the results.

Hope it helps

1 Like

So I think I’ve gotten the correct number, since I get x15, y600, z0 before the teleport and x15,y-600,z0 after the multiply. Which flips the velocity vector like I’d think it should.

but for some reason I can’t quite seem to figure out where to apply the “set physics linear velocity” too…

If I drag off of player character it gets the capsule component automatically, and that doesn’t seem to work. It doesn’t let me apply physics linear velocity to the player controller or pawn.

I’ve figured it out!

If anyone every wanders by here looking for answers I’m sorry for my wire mess…

This allows a player to be jumping in any direction, teleport, and have the momentum of the jump carried over to their new rotation direction.

Thank you for the help, it was massively helpful since it gave me much needed directions to look into!

1 Like