Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How do i figure out when a TaskReference is complete Kinematica

Discussion in 'Animation Previews' started by antidirep, Mar 14, 2021.

  1. antidirep

    antidirep

    Joined:
    Oct 5, 2018
    Posts:
    4
    So i've been playing around with the Kinematica package animation and created a sequence in kinematica how do I know when a sequence is finished and to fire the next task in the sequence when the previous animation in the sequence is finished. I have used a Action().Timer(2.5f), but is there a better way to handle this?

    Here my source:


    var selector = synthesizer.Root.Selector();

    {
    var sequence = selector.Condition().Sequence();

    //We change this to attack rather then idle
    sequence.Action().MatchPose(
    synthesizer.Query.Where(
    Idle.Default).And(Attack.Default), 0.01f);

    sequence.Action().Timer(2.5F);
    sequence.PlayFirstSequence(synthesizer.Query.Where(
    Idle.Default).And(Locomotion.Default));
    }


    Thank you in advance
     
  2. antidirep

    antidirep

    Joined:
    Oct 5, 2018
    Posts:
    4
    Also how do i make Task wait till the current Task is finished in kinematica if possible.
    Thanks
     
  3. antidirep

    antidirep

    Joined:
    Oct 5, 2018
    Posts:
    4
    Never mind found a solution to it. Brokedown the Kinematica demo sample.