GetStandardInteractionButtonUp() public method

Was the standard interaction button just released? In VR, this is a trigger press. In 2D fallback, this is a mouse left-click.
public GetStandardInteractionButtonUp ( ) : bool
return bool
Esempio n. 1
0
 void HandAttachedUpdate( VRHand hand )
 {
     //Trigger got released
     if ( hand.GetStandardInteractionButtonUp() )
     {
         hand.DetachObject( gameObject );
     }
 }
Esempio n. 2
0
 void HandAttachedUpdate(VRHand hand)
 {
     //Trigger got released
     if (hand.GetStandardInteractionButtonUp())
     {
         hand.DetachObject(gameObject);
     }
 }
 void HandAttachedUpdate(VRHand hand)
 {
     //Trigger got released
     if (hand.GetStandardInteractionButtonUp())
     {
         // Detach ourselves late in the frame.
         // This is so that any vehicles the player is attached to
         // have a chance to finish updating themselves.
         // If we detach now, our position could be behind what it
         // will be at the end of the frame, and the object may appear
         // to teleport behind the hand when the player releases it.
         StartCoroutine(LateDetach(hand));
     }
 }
    void HandHoverUpdate( VRHand hand )
    {
        if ( hand.currentAttachedObject )
            return;

        if ( hand.GetStandardInteractionButtonDown() )
        {
            hand.HoverLock( GetComponent<VRInteractable>() );
        }

        if ( hand.GetStandardInteractionButtonUp() )
        {
            hand.HoverUnlock( GetComponent<VRInteractable>() );
        }

        if ( hand.GetStandardInteractionButton() )
        {
            UpdateLinearMapping( hand.transform );
        }
    }
Esempio n. 5
0
    void HandHoverUpdate(VRHand hand)
    {
        if (hand.currentAttachedObject)
        {
            return;
        }

        if (hand.GetStandardInteractionButtonDown())
        {
            hand.HoverLock(GetComponent <VRInteractable>());
        }

        if (hand.GetStandardInteractionButtonUp())
        {
            hand.HoverUnlock(GetComponent <VRInteractable>());
        }

        if (hand.GetStandardInteractionButton())
        {
            UpdateLinearMapping(hand.transform);
        }
    }
	void HandHoverUpdate( VRHand hand )
	{
		if ( hand.GetStandardInteractionButtonDown() )
		{
			hand.HoverLock( GetComponent<VRInteractable>() );

			initialMappingOffset = linearMapping.value - CalculateLinearMapping( hand.transform );
			sampleCount = 0;
			mappingChangeRate = 0.0f;
		}

		if ( hand.GetStandardInteractionButtonUp() )
		{
			hand.HoverUnlock( GetComponent<VRInteractable>() );

			CalculateMappingChangeRate();
		}

		if ( hand.GetStandardInteractionButton() )
		{
			UpdateLinearMapping( hand.transform );
		}
	}
    void HandHoverUpdate(VRHand hand)
    {
        if (hand.GetStandardInteractionButtonDown())
        {
            hand.HoverLock(GetComponent <VRInteractable>());

            initialMappingOffset = linearMapping.value - CalculateLinearMapping(hand.transform);
            sampleCount          = 0;
            mappingChangeRate    = 0.0f;
        }

        if (hand.GetStandardInteractionButtonUp())
        {
            hand.HoverUnlock(GetComponent <VRInteractable>());

            CalculateMappingChangeRate();
        }

        if (hand.GetStandardInteractionButton())
        {
            UpdateLinearMapping(hand.transform);
        }
    }
	void HandAttachedUpdate( VRHand hand )
	{
		//Trigger got released
		if ( hand.GetStandardInteractionButtonUp() )
		{
			// Detach ourselves late in the frame.
			// This is so that any vehicles the player is attached to
			// have a chance to finish updating themselves.
			// If we detach now, our position could be behind what it
			// will be at the end of the frame, and the object may appear
			// to teleport behind the hand when the player releases it.
			StartCoroutine( LateDetach( hand ) );
		}
	}
Esempio n. 9
0
	void HandAttachedUpdate( VRHand hand )
	{
		//Trigger got released
		if ( hand.GetStandardInteractionButtonUp() )
		{
			// Detach ourselves late in the frame.
			// This is so that any vehicles the player is attached to
			// have a chance to update themselves.
			// If we detach now, our position will be behind the frame,
			// and it will feel like a weird teleport.
			StartCoroutine( LateDetach( hand ) );
		}
	}