Announcement

Collapse
No announcement yet.

Calculating direction in AnimBP has idle set to 90, not 0. Using Epic's Animation Starter Pack

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

    Calculating direction in AnimBP has idle set to 90, not 0. Using Epic's Animation Starter Pack

    I'm using the setup from Epic's Animation Starter Pack for calculating character direction for using blendspace animations with the left analog stick. However it's making my character movement jerky when I no longer input movement. Upon using a print string, I see that when idling the character direction is 90, which is what it should be when moving the left analog stick left. Does anyone know of a solution on how to fix this?

    I'm basically getting velocity and rotation, and feeding it into a calculate direction node in the anim BP, then setting the return value as the Direction variable. Any help would be greatly appreciated!

    Simulacrum Game | Play The Alpha | Caldera Entertainment | Twitter | ArtStation

    #2
    Im not sure about the idle being set at 90 but usually when getting jerky movement in a blend space during idle it means your blend space is between values for some reason. One thing I do is copy paste the idle animation in all zero velocity slots (regardless of direction) in the blend space graph so that the whole bottom line has an idle anim node on it instead of just the center node slot. I feel like this can help with funky blend space behavior.

    Comment


      #3
      I managed to get around it by calculating direction using input move forward and move right in the character blueprint. For anyone else in the same position here's how -

      In your character blueprint make a vector using the input axis move forward and move right nodes. Plug the axis value of forward into the x input of the make vector, and the value for right into the y value. Plug the return value into a Get Yaw Pitch from Vector and plug the Yaw into a set node for a custom float which can be casted to in the AnimBP. This makes idle and forward 0, backwards 180, left -90 and right 90. I was able to get the blendspace working after that. The values themselves don't transition smoothly to their corresponding value, so you'll need to increase the interpolation time in your blendspace anim. I used a value of .4 which seemed to work nicely. =)

      Simulacrum Game | Play The Alpha | Caldera Entertainment | Twitter | ArtStation

      Comment


        #4
        Odd setup. what was the starting template on this?

        Comment


          #5
          How do you mean?

          Simulacrum Game | Play The Alpha | Caldera Entertainment | Twitter | ArtStation

          Comment


            #6
            Is it a paw/actor, are movement axis locked to a plane? Etc. What was template used when starting the project?

            Comment


              #7
              Random question on this as it may have set a lightbulb off in my head about a problem i was having.

              Was/is your character mesh component rotated 90 degrees to make it face forward on the X axis?

              Comment


                #8
                Originally posted by savagebeasty View Post
                Random question on this as it may have set a lightbulb off in my head about a problem i was having.

                Was/is your character mesh component rotated 90 degrees to make it face forward on the X axis?
                They almost always are if you use the default stuff. that's because the skeleton and character mesh are Y forward facing, the character blueprint is X forward facing. the biggest template that this causes issues with is the SideScroller - that I have seen this far anyway.

                Comment


                  #9

                  Originally posted by savagebeasty View Post
                  Random question on this as it may have set a lightbulb off in my head about a problem i was having.

                  Was/is your character mesh component rotated 90 degrees to make it face forward on the X axis?
                  Yeah the character mesh was rotated to face x.


                  Originally posted by MostHost LA View Post
                  Is it a paw/actor, are movement axis locked to a plane? Etc. What was template used when starting the project?

                  I'm using the Paragon Aurora. Not sure if anything is axis locked, the problem persisted even in another project with the same node that I didn't even modify. A quick search showed that it's something others have experienced as well. That said I was able to get around it so I'm not particularly worried about that node anymore.

                  Simulacrum Game | Play The Alpha | Caldera Entertainment | Twitter | ArtStation

                  Comment

                  Working...
                  X