日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class Momentum

    Applies acceleration/velocity/friction to simulate momentum for an object being moved by other solvers/components

    Inheritance
    Object
    Solver
    Momentum
    Inherited Members
    Solver.UpdateLinkedTransform
    Solver.MoveLerpTime
    Solver.RotateLerpTime
    Solver.ScaleLerpTime
    Solver.Smoothing
    Solver.SolverHandler
    Solver.GoalPosition
    Solver.GoalRotation
    Solver.GoalScale
    Solver.WorkingPosition
    Solver.WorkingRotation
    Solver.WorkingScale
    Solver.Awake()
    Solver.Start()
    Solver.OnDestroy()
    Solver.SolverUpdateEntry()
    Solver.SnapGoalTo(Vector3, Quaternion, Vector3)
    Solver.SnapTo(Vector3, Quaternion)
    Solver.SnapGoalTo(Vector3, Quaternion)
    Solver.AddOffset(Vector3)
    Solver.SmoothTo(Vector3, Vector3, Single, Single)
    Solver.SmoothTo(Quaternion, Quaternion, Single, Single)
    Solver.UpdateTransformToGoal()
    Solver.UpdateWorkingToGoal()
    Solver.UpdateWorkingPositionToGoal()
    Solver.UpdateWorkingRotationToGoal()
    Solver.UpdateWorkingScaleToGoal()
    Namespace: Microsoft.MixedReality.Toolkit.Utilities.Solvers
    Assembly: cs.temp.dll.dll
    Syntax
    public class Momentum : Solver

    Properties

    AccelerationRate

    Accelerate to goal position at this rate

    Declaration
    public float AccelerationRate { get; set; }
    Property Value
    Type Description
    Single

    Resistance

    Friction to slow down the current velocity

    Declaration
    public float Resistance { get; set; }
    Property Value
    Type Description
    Single

    ResistanceVelocityPower

    Apply more resistance when going faster- applied resistance is resistance * (velocity ^ resistanceVelocityPower)

    Declaration
    public float ResistanceVelocityPower { get; set; }
    Property Value
    Type Description
    Single

    SnapZ

    Instantly maintain a constant depth from the view point instead of simulating Z-velocity

    Declaration
    public bool SnapZ { get; set; }
    Property Value
    Type Description
    Boolean

    Springiness

    Apply more acceleration if farther from target- applied acceleration is accelerationRate + springiness * distance

    Declaration
    public float Springiness { get; set; }
    Property Value
    Type Description
    Single

    Methods

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    Solver.OnEnable()

    SnapTo(Vector3, Quaternion, Vector3)

    Snaps the solver to the desired pose.

    Declaration
    public override void SnapTo(Vector3 position, Quaternion rotation, Vector3 scale)
    Parameters
    Type Name Description
    Vector3 position
    Quaternion rotation
    Vector3 scale
    Overrides
    Solver.SnapTo(Vector3, Quaternion, Vector3)
    Remarks

    SnapTo may be used to bypass smoothing to a certain position if the object is teleported or spawned.

    SolverUpdate()

    Should be implemented in derived classes, but Solver can be used to flush shared transform to real transform

    Declaration
    public override void SolverUpdate()
    Overrides
    Solver.SolverUpdate()
    Back to top Generated by DocFX