class MAGES::Interaction::VelocityBasedTransformProvider

Overview

Will use velocities to try to match the gameobject this component is attached to, to the target. It initially will move the gamobject closer to the target using Rigidbody.MovePosition and Rigidbody.MoveRotation. More…

class VelocityBasedTransformProvider: public MAGES::Interaction::BaseTransformProvider
{
public:
    // enums

    enum PoseWeightMode;

    // properties

    PoseWeightMode PoseMode;
    float VelocityDamping;
    float AngularVelocityDamping;
    float MaxVelocity;
    float MaxAngularVelocity;
    float TeleportDistance;

    // methods

    virtual override void Attach(IInteractor interactor);
    virtual override void Process(UpdatePhase updatePhase);
};

Inherited Members

public:
    // properties

    IInteractable Interactable;

    // methods

    virtual void Attach(IInteractor interactor);
    virtual void Detach(IInteractor interactor);
    virtual void DetachCompletely();
    virtual bool IsAttachedTo(IInteractor interactor);
    virtual void Process(UpdatePhase updatePhase);

Detailed Documentation

Will use velocities to try to match the gameobject this component is attached to, to the target. It initially will move the gamobject closer to the target using Rigidbody.MovePosition and Rigidbody.MoveRotation.

Properties

PoseWeightMode PoseMode

Gets or sets the pose weight mode.

float VelocityDamping

Gets or sets a value between 0 and 1, for velocity damping.

float AngularVelocityDamping

Gets or sets a value between 0 and 1, for angular velocity damping.

float MaxVelocity

Gets or sets the maximum velocity the object can have.

float MaxAngularVelocity

Gets or sets the maximum angular velocity the object can have.

float TeleportDistance

Gets or sets a max distance, at which the object will be teleported to the target.

Set it less or equals to 0, to disable teleportation.

Methods

virtual override void Attach(IInteractor interactor)

Attach the object to the AttachedTransform.

Parameters:

interactor

The interactor to attach to.

virtual override void Process(UpdatePhase updatePhase)

Called by the master to update the TransformProvider in the given updatePhase.

Parameters:

updatePhase

The update phase this is called.