How to move player from A to B (Not Teleport)

Hey guys. What I want to do is have the player walk up to a door, player presses E, It then translate the character from where they are to the position and rotation of a certain point. I want to also use this to move the player through the door before the door closes behind you and regain control. Like a more up to date resident evil door animation in a way.

So far I have not been able to move the player at all and it’s confusing me greatly haha

I can’t use matinee’s or timelines as far as I am aware because the door’s location isn’t fixed

Thanks!

Hey there,

shouldn’t it be possible to just do this in a root motion Animation?

As far as I understood you, the Player controls the Character until he reached the door and presses E.

Then you want the Player to loose control, the Character to open the door, walk through it and close it. After that, the Player should regain control over the Character, or?

So i would just, as soon as the Player hits E at the Door, “Disable Input”, start the Animation (which you would need to create in your favorite 3D Modeling Program), and at the End of the Animation, “Enable Input”.

Are there other ways to move the Player?

Sure, tons of.

  • You could let the Player move via the NavMesh (that’s more for AI)
  • You could write your own “move logic” where you Interp from one Vector to another and just play the Walk Animation in that time. Interping Vectors would be done by using the “EventTick” and two locations (could add 2 sockets or something like that to the door and get the locations of them). Doesn’t look that good, but it would work.
  • You could remove Input and still apply “MovementInput”. Similar to the upper solution, but that would actually move the Player via the MovementComponent. Would look better, but the Animation solution is still the best way.

Hope that helps to get started!

Cheers (:

Yeah your exactly right in what I want haha With my total lack of experience with animation I guess I was trying to avoid it even though it will prob be the best and easiest way to do it haha I still would need to make sure to move the player into the correct spot for the animation for it to work so the other ways are handy too. I tried doing something like the second interping two vectors but I had trouble getting it to effect the player controller. I should prob practice on a simple actor first before trying to move up to the player so I at least know i got that part right. Thanks for the help so far!

You will probably “record” the Animation with the Door in the scene (in your 3D program). So you know where the Door is placed and where the Character is placed. So you can add a Socket (or what ever represents a 3D position in your Blueprint) to your Door at the spot you need the player to be.

If he then overlaps with the Door collision and presses E, you disable Input and let the character move to that Socket Position (and Rotation of course). Then you can start the Root Animation and the rest is done by exactly that.

If your question is answered make sure to hit the accept icon on the top left of the answer (: