Announcement

Collapse
No announcement yet.

How Do I Make a Simple "dodge" That Gets Triggered When I Hit a Key?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How Do I Make a Simple "dodge" That Gets Triggered When I Hit a Key?

    All I'm attempting to do is set up an input so that when I hit a key my character moves to the side by some amount, basically a simple dodge. I'm not even worried about animations at this point, I just want the character to slide. I have spent many hours watching tutorials and tried a lot of different methods but I can't get a single one to work. I tried animating the motion in Blender and using root motion, but despite watching multiple tutorials on it, I can't get it to work. And it's so complicated with so many different settings that at this point I've given up on it. I also tried using an add force node and an add impulse node, neither did anything. The only thing that I got to kind of work is using the "set actor location" node, but that just instantly teleports the character and that won't really work for what I need. Is there some easy way of doing this or is there a really well done tutorial that explains how to set up root motion in blender and get it into unreal so it actually works? Thanks in advance.

    #2
    There's multiple ways to accomplish this. But first you need to you need to define 3 variables. Speed (velocity), Time, Distance.

    The distance you want the character to move and the time you want it to take will determine the movement speed needed to accomplish it.

    Distance / Time = Speed
    Time * Speed = Distance
    Distance / Speed = Time


    Method 1: Key press -> Timeline -> interpto/Lerp -> Set actor location
    Set actor location will determine the distance and timeline will determine the time (duration).

    Method 2: Key press -> set movement speed (CMC -> max walk speed) -> animation (montage) -> reset movement speed (CMC -> max walk speed).
    Speed is obviously handled with (CMC -> max walk speed). Duration of the animation will determine time.
    Last edited by Rev0verDrive; 08-02-2020, 02:49 PM.

    Comment


      #3
      Thanks man, I finally got it working. The reason why the Lerp node would not work is because I needed a timeline plugged into the alpha channel. Thanks for the help.

      Comment

      Working...
      X