편집

다음을 통해 공유


PinchSpring Class

Definition

Simulates a point mass on a spring that can be used as a grabbable handle.

public ref class PinchSpring : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::IMixedRealityFocusHandler, Microsoft::MixedReality::Toolkit::Input::IMixedRealityPointerHandler, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.Input.NearInteractionGrabbable))]
public class PinchSpring : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Input.IMixedRealityFocusHandler, Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointerHandler, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.Input.NearInteractionGrabbable))>]
type PinchSpring = class
    inherit MonoBehaviour
    interface IMixedRealityPointerHandler
    interface IEventSystemHandler
    interface IMixedRealityFocusHandler
Public Class PinchSpring
Inherits MonoBehaviour
Implements IEventSystemHandler, IMixedRealityFocusHandler, IMixedRealityPointerHandler
Inheritance
UnityEngine.MonoBehaviour
PinchSpring
Attributes
UnityEngine.RequireComponentAttribute
Implements
IMixedRealityFocusHandler IMixedRealityPointerHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

PinchSpring()

Properties

HandleAnchor

The static anchor point of the spring.

HandleConnector

The visuals to connect the anchor to the tip. This object will be scaled along the local z-axis.

HandleTip

The object that acts as the point mass in the spring system.

HandleTipInterpolateSpeed

How quickly to move the tip when interpolation the position and scale.

RestingDirection

The direction the tip should be positioned from the anchor when the spring is at rest.

RestingDistance

How far the tip should rest from the anchor when the spring is at rest.

RestingFocusedDistance

How far the tip should be positioned from the anchor when the spring is at rest and focused.

SnapDistance

Distance (in meters) to switch from interpolation to snapping to the grasp point when being manipulated.

SpringDampening

The percentage of velocity to remove from the point mass each frame.

SpringStiffness

The constant factor characteristic of the spring, or stiffness.

TipMass

The mass (in kilograms) of the tip.

Methods

OnFocusEnter(FocusEventData)

The Focus Enter event is raised on this GameObject whenever a IMixedRealityPointer's focus enters this GameObject's Collider.

OnFocusExit(FocusEventData)

The Focus Exit event is raised on this GameObject whenever a IMixedRealityPointer's focus leaves this GameObject's Collider.

OnPointerClicked(MixedRealityPointerEventData)

When a pointer clicked event is raised, this method is used to pass along the event data to the input handler.

OnPointerDown(MixedRealityPointerEventData)

When a pointer down event is raised, this method is used to pass along the event data to the input handler.

OnPointerDragged(MixedRealityPointerEventData)

Called every frame a pointer is down. Can be used to implement drag-like behaviors.

OnPointerUp(MixedRealityPointerEventData)

When a pointer up event is raised, this method is used to pass along the event data to the input handler.

Applies to