How do I play an animation that was included in the FBX from C++?
There’s only one animation, and it’s rather simple. I would think that it would be equally simple to play this type of animation but I haven’t had any luck thus far.
I have the USkeletalMeshComponent, and I can see animation attributes from it, including the AnimScriptInstance but can’t figure out how to get it to play.
you need to make an AnimMontage out of it first, then play that one
I requested this functionality to play an Anim directly from code a long time ago (like we could in UDK), but it went ignored
If you look at BTTask_PlayAnimation.cpp you can see how the Behavior Tree system plays animations, you can even toss in a break point to break things down further and follow the code line by line if needed.
Thank you for the tip ExtraLifeMatt. I’ll keep that in mind for animations that will be coming up in the near future. Fortunately I was able to get my current animation to play on demand now. There certainly looks like a lot of goodies in there though (montage, etc.).
Do you by chance have any AI experience? I’m trying to get my enemy to patrol, attack, and retreat as needed using the floating component. I have another thread for this question though.