Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Resolved GetAnimationStreamLocalToRootNode

Discussion in 'DOTS Animation' started by kite3h, Mar 18, 2021.

  1. kite3h

    kite3h

    Joined:
    Aug 27, 2012
    Posts:
    197
    If you want to relax the tangle of your shoulders mesh or describe the shape of muscles, you will need to use constraints.

    But There is no useful samples. There is only one Aim constraint Sample even it aim Static Position.

    If you want aiming to one of bones, You use GetAnimationStreamLocalToRootNode

    var boneRootNode = graphSystem.CreateNode<GetAnimationStreamLocalToRootNode>(graph);
    var bone2RootNode = graphSystem.CreateNode<GetAnimationStreamLocalToRootNode>(graph);

    Create Node

    set.Connect(entityNode, boneRootNode, GetAnimationStreamLocalToRootNode.KernelPorts.Input, NodeSet.ConnectionType.Feedback);
    set.Connect(entityNode, bone2RootNode, GetAnimationStreamLocalToRootNode.KernelPorts.Input, NodeSet.ConnectionType.Feedback);

    Connect Node

    set.SendMessage(boneRootNode, GetAnimationStreamLocalToRootNode.SimulationPorts.Rig, rig);
    set.SendMessage(bone2RootNode, GetAnimationStreamLocalToRootNode.SimulationPorts.Rig, rig);

    Set rig

    set.Connect(boneRootNode, GetAnimationStreamLocalToRootNode.KernelPorts.Translation, leftChestNode, PositionConstraintNode.KernelPorts.SourcePositions, 0);
    set.Connect(bone2RootNode, GetAnimationStreamLocalToRootNode.KernelPorts.Translation, leftChestNode, PositionConstraintNode.KernelPorts.SourcePositions, 1);

    Connect to Constraint Node

    It work correctly , But NotFiniteNumberException occured even Unity Sample project.