x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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!

Product Version: UE 4.11
Tags:
more ▼

asked Apr 16 '16 at 06:56 PM in Blueprint Scripting

avatar image

CactusFantastico
80 10 21 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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 (:

more ▼

answered Apr 17 '16 at 11:56 AM

avatar image

eXi
6.8k 333 185 470

avatar image CactusFantastico Apr 17 '16 at 05:41 PM

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!

avatar image eXi Apr 17 '16 at 06:13 PM

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 (:

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question