I am attempting to build an actor that responds to input from a player controller, and executes animations based on the state of the actor (think cabinet that is closed, doing open animation and vice versa).
I have built the animations in Blender, and successfully imported them via FBX file as a skeletal mesh, with associated animations.
Through much experimentation, I’ve discovered the standard state machine implementation of an animation blueprint does not apply, because the animation is only executed on transition between states (Open, Closed). During the open and closed state, no animation should run.
My present approach is to use an animation blueprint and a simple montage. The montage has a single slot, and two sections. One section is open (with open animation) one for close. Each section has a completion notifier to trigger an action in the animation blueprint (change states from opening to open, closing to closed).
My problem comes when I want to create the blueprint for the cabinet itself. I add the skeletal mesh and a collision box to the blueprint. If I parent the BP to “Actor”, I can enable and disable input from the player controller fine. However, when I try to access the blueprint from the animation blueprint via a cast (to access it’s state variable), the compiler throws a warning that the cast will always fail because the parent is not a Pawn.
If I reparent the Blueprint from Actor to Pawn, I can no longer activate/deactivate input from the player controller.
So, can a blueprint parented to just Actor have an animation blueprint? The component is part of the scene, and wants to respond to player input, but it’s not really a pawn, because the player controller will never really “posses” it.
Any input or suggestions would be much appreciated.