Wondering if anyone knows how to make an AnimGraph-or something custom that would provide the same functionality-in C++. From what I’ve been reading it sounds like it might not be possible without altering the source code. AnimGraphs are heavily tied to blueprints it seems like. Which makes me insatiably curious cause it seems like the only thing that doesn’t work in c++. Or at least there seems to be no documentation on it.
I’ve made montages and blend spaces and can play them with USkeletalMeshComponent::PlayAnimation. Been trying to play the montage with UAnimMontage::Montage_Play and it seems like everyone who uses that has their montage tied to a blueprint. I’ve turned the animation mode to AnimationSingleNode instead of Blueprint mode and after manually connecting a UAnimInstance to my skeleton the Montage_Play funtion is returning the actual length of the montage I’m playing. The animation just won’t play.
Everything in the blueprint leads to the output pose node though in the anim graph. The Montage_Play is normally in the event graph and after analyzing the function it seems to mostly just set things and the reason using montage_play in c++ will play the animation in blueprint mode is because that blue print has an animgraph that’s tied to that output pose node. Seems like the only thing I can find in C++ that essentially outputs an actual pose from animation data is the USkeletalMeshComponent::PlayAnimation() function. It looks like all that does is set the animation to your mesh and turn isPlaying to true. Must be something else in the engine that sees isPlaying is true and actually translates the animation data into an output pose but I can’t quite find where that happens in the source code.
When I try putting a blend mask on my montage and just playing it with PlayAnimation it doesn’t seem to take. Normally for the types of animations I’m trying to set up you cache the pose, use the cached pose, plug it into something like layeredblendperbone and then feed that to the output pose. I have found a few functions for getting chached poses in c++ and although I don’t find anything like layeredblendperbone there are perbone blend type functions where you have to set the blend on each bone manually. Or just use the blend profile from your skeleton. Just not sure how to feed that cached data to an output pose in c++. Unless I actually take the data and somehow use that to translate the bones directly. Seen a few functions for doing manual bone transforms to.
Any one have any know how on this? Seems like something few-if any-people have tried or accomplished. At least not that I’ve found so far.