Duplicated characters movement component doesn't fully work

Hi,

So I got the Animation Pack of the market. I didn’t want to modify the original so I created a copy of ASP_Character by right clicking and hit Create Copy. It seems that when you do this, the character’s Crouch and Jump features of the movement component will no longer work. Walk/Run work fine.

To Replicate:

  1. Using a clean project of any template (I use 3rd person), I setup the space bar to be jump and ctrl to be crouch. Set ASP_Character as the default pawn in the GameMode. Character jumps and crouches fine.
  2. Right click on ASP_Character, hit create copy (4.4.3) or Duplicate (4.5.0) and name it MyASPCharacter.
  3. Set Default Pawn in GameMode to be MyASPCharacter
  4. Attempt to jump or crouch, nothing happens.
  5. Open Debugger and see that the wires show execution is getting to the set jump velocity but nothing is happening.
  6. Diff the 2 Blueprints, There are no differences except the name change.
  7. Very very strange!

Stats:

Unreal Engine 4.4.3, 4.5.0

Windows 7 x64

Nvidia GTX 970 - 4GB

Intel Xeon 5680 - 96GB ram

Asus 27" 2560x1440

I figured this out. It seems that the Jump and crouch has been moved to the ASP_HeroTPP_Blueprint and hard coded to only work with the ASP_Character class. This is very confusing. First, Its different than every method documented & video tutorial created. Secondly, its not generic enough to allow you to use your own characters.

Both of these should really be addressed imo.

Hey tebruno99,

As you discovered, the source of the issue is that the ASP_HeroTPP_Blueprint AnimBP casts to ASP_Character specifically. The AnimBP needs to cast to the class using it to reference the variables it needs when specifying Crouch and Jump animations.

There are two things you can do to adjust this:

Instead of duplicating the ASP_Character Blueprint, make a child Blueprint of class ASP_Character. This way you can make any adjustments you need and still access the variables from the parent class.

Or you can swap the Cast to ASP_Character nodes with Cast to MyASPCharacter (or whatever you choose to name your Character). If you do it this way, make sure you get a fresh version of the variables being referenced; in the case where you make a duplicate of ASP_Character, you would need to Cast to MyASPCharacter and then pull off that for JumpButtonDown and CrouchButtonDown to access that class’ variables, because the old variables are referencing the original BP.

This may seem complicated, but generally you need to make sure that the AnimBlueprint you’re using for your character only references the character BP or its parent. If you’re seeing documentation or tutorials that say otherwise, please let me know where and I can get those updated. I will also make a feature request of a node that casts to the current CharacterBP that is using the AnimBP, but I don’t know how possible that is.

Hope that helps!

Wouldn’t a more traditional solution to be to use an Interface. You could provide a getJumpButtonDown, getCrouchButtonDown interface and then have the AnimationBlueprint check if the actor implements that interface instead of hard coding directly to the class.

Seems this would make the content more accessible to users, provide a generic solution, as well as making it so that this information is no longer “hidden” in the depths of the anim event graph.

An interface would present a couple of new problems, such as possibly sending the same data to multiple characters using the same interface, as well as introducing another element in the communication process between assets. It’s certainly possible, and you are welcome to set it up that way if you prefer.

Using the AnimBP’s Event Graph is a standard part of animating a character in UE4, and the content creators felt this was the most efficient way to handle the Jump and Crouch animations in this case. If you feel that this is not communicated properly, please let us know where you are seeing something different and we can update that. It looks like the Technical Details for the Animation Starter Pack doesn’t exist on the wiki page, so I can at least see about getting that added and include the information discussed here.

I believe reference documentation would equally resolve my complaint. I just spent a very long time searching for why jump wasn’t working on my characters to find it tucked away in my Anim Blueprint. I’m not an animator so I don’t believe I would have ever looked there except I resorted to opening every blueprint trying to find where Jump was actually being called.