Announcement

Collapse
No announcement yet.

C++ Driven Animation State Machine Implementation?

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

    C++ Driven Animation State Machine Implementation?

    I'm trying to drive my Animation Blueprint's state machine through C++ rather than the blueprint implementation, so that hopefully I can have basic implementation for things such as:
    - default C++ transition logic
    - pre-defined/hardcoded anim graph states

    I've already set up c++ instances of UAnimInstance to drive my Animation Blueprints, but can't seem to find any documentation/information on how I can drive the State Machine and Animation Graph through C++.

    I've looked at the tuts on creating new animation nodes which I'd guess is similar, but there doesn't seem to be anything for these specific nodes (Transitions and States).

    Any help would be great, thanks!


    #2
    Hello,

    I am also trying to do the same.
    Any update on whether you were able to do it and how?

    Thanks,
    Akshay Shah.

    Comment


      #3
      The optimal way to drive the animation is through the multi-threaded Fast Path optimization. This enables UE to update the bones in parallel on multiple threads.

      Look for the lightning bolt on the nodes to ensure no thunking to BP VM.

      Move any bp logic to your AnimInstance and AnimInstanceProxy.

      Using this approach you can still use the AnimGraph to define the flow.

      https://docs.unrealengine.com/en-us/...n/Optimization
      https://docs.unrealengine.com/en-us/...ation/FastPath
      https://www.casualdistractiongames.com

      Comment


        #4
        Also if you want to bypass transitions and set states manually in C++ you'll need to change engine source to make SetState() public instead of protected.
        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

        Comment

        Working...
        X