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"

Playing different animation when moving left or right 2.5D SideScroller.

I am working on a 2.5D Side scroller. I have animated my characters run so that the front of his torso is facing towards the camera. The problem I am having is that when he moves left the model flips and his back is facing the camera. I would like his front to always be visible to the viewer. I figured the easiest solution is to have two Running animations with the run animation flipped. However I am currently struggling to get it to play the different animation dependings on if the character is moving to the left or the right.

I'm sure this is simple, but I am new to UE4 and have not had any luck finding an answer via googling. Anyone able to help?

Product Version: UE 4.21
Tags:
more ▼

asked Feb 08 '19 at 12:04 AM in Blueprint Scripting

avatar image

Willypup
6 1 1

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

What I would suggest is that you make a 1D animation blendspace and in the blueprint of the character, you check the X velocity (or Y velocity, it depends on the direction the level is facing) and you use that value to control the blendspace.

The way you get the velocity of the character is like this: alt text

If you're not familiar with blendspaces, check out this Unreal engine 4 official tutorial (it's old but it's pretty straightforward so, you'll be able to follow it pretty easily):

https://www.youtube.com/watch?v=7b9WM8TVdpA

Then you'll have to plug that velocity X or Y value into the blendspace node in the Animation Blueprint State

PS: I don't know your current CharacterMovement settings so after doing what i've said, even if you did it correctly, you might have to make sure Orient Rotation to movement in the character movement component is disabled and Use Controller rotation Yaw in the parent is also disabled

captura.png (59.8 kB)
more ▼

answered Feb 08 '19 at 08:24 AM

avatar image

ZlotyGames
28 1 5 6

(comments are locked)
10|2000 characters needed characters left
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