docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MotionSynthesizer

    The motion synthesizer is the actual core component of Kinematica.

    Namespace: Unity.Kinematica
    Assembly: solution.dll
    Syntax
    [BurstCompile]
    public struct MotionSynthesizer
    Remarks

    The motion synthesizer represents the actual core implementation of Kinematica which can be used in a pure DOTS environment directly.

    It provides a raw transform buffer which represents the current character pose and does not provide any infrastructure to feed the current pose to the character.

    The motion synthesizer continuously "plays" an sequence of animation poses. The current time can be changed by "pushing" a new time to the synthesizer. Upon pushing a new time, the synthesizer automatically removes any deviations between the previous pose and the new pose.

    The motion synthesizer also has a convenient method of creating semantic queries, which filter the poses stored in the motion library based on tags and markers.

    Last but not least, the motion synthesizer contains a task graph that consist of a hierarchy of nodes that collectively can operate on a sequence of poses to perform a user defined processing step in order to arrive at a single new "push time" each frame.

    Fields

    Name Description
    trajectory

    The trajectory model maintains a representation of the simulated character movement over the global time horizon.

    Properties

    Name Description
    Binary

    Allows direct access to the underlying Kinematica runtime asset.

    BlendDuration

    Return blend duration between segments in seconds

    CurrentVelocity

    Velocity from binary at current sampling time, in meters per second, in character space

    IsDebugging
    IsValid
    Query

    Introduces a new semantic query expression.

    Time

    Denotes the current sampling time of the motion synthesizer.

    TrajectoryArray

    Allows access to the trajectory of the motion synthesizer.

    WorldRootTransform

    Denotes the world space root transform of the character.

    deltaTime

    Denotes the delta time in seconds during the last update.

    Methods

    Name Description
    AddCostRecordsToFrameDebugger(IFrameDebugProvider)
    AdjustTrajectory(AffineTransform, bool)

    Allows for non-continuous root displacements.

    ClearTrajectory(NativeSlice<AffineTransform>)
    CreateTrajectory(Allocator)
    DebugPushGroup()
    DebugReadObject<T>(DebugReference)
    DebugWriteBlittableObject<T>(ref T, bool)
    DebugWriteUnblittableObject<T>(ref T, bool)
    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    FindClosestPoseAndTrajectoryMatch(PoseSet, SamplingTime, Trajectory, float, float)
    FindClosestPoseMatch(PoseSet, SamplingTime, float)
    GetFrameDebugInfo()

    return the currently active animation frames

    GetTrajectoryDeltaTransform(float)

    Calculates the curent root displacement transform.

    LoopSegmentIfEndReached(SamplingTime)
    MatchPose(PoseSet, SamplingTime, MatchOptions, float)
    MatchPoseAndTrajectory(PoseSet, SamplingTime, Trajectory, MatchOptions, float, float, float)
    PlayAtTime(SamplingTime)

    Switches the pose generation stream to read from the sampling time passed as argument.

    PlayAtTime(TimeIndex)

    Switches the pose generation stream to read from the time index passed as argument.

    PlayFirstSequence(PoseSet)

    Play the first sequence from

    queryResult
    Rewind(SamplingTime)

    Retrieves the time index at the beginning of the interval that the sampling time passed as argument belongs to.

    Rewind(TimeIndex)

    Retrieves the time index at the beginning of the interval that the time index passed as argument belongs to.

    SelectFirstPose(NativeArray<PoseSequence>)
    SetWorldTransform(AffineTransform, bool)

    Teleport character to a target transform

    SteerRootMotion(Trajectory, float, float, float, float)

    Returns the interpolated transform between the root delta transform from Kinematica binary for the current frame, and the desired delta transform.

    Update(float)

    Update method that needs to be called each frame to advance the state of the motion synthesizer.

    UpdateDebuggingStatus()

    See Also

    Query
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)