Skip to content

Method OnPointerClick only triggers when pad is being held down #48

Open
@munro-riley

Description

@munro-riley

For our project we have the basic teleport script added and working based off of the pad button. We also wrote a simple OnPointerClick script that just sends a message to the console and attached to a mesh.

using System.Collections;
using System.Collections.Generic;
using UnityEngine.EventSystems; 
using UnityEngine;
using UnityEngine; using HTC.UnityPlugin.Vive; 
using UnityEngine.UI;

public class Marker : MonoBehaviour , IPointerClickHandler {
        public void OnPointerClick(PointerEventData eventData) {
		if (eventData.IsViveButton(ControllerButton.Trigger)) {
			Debug.Log("worked");
		}
	}
}

The console only logs 'worked' when I'm holding the pad down as well as the trigger. It doesn't work on trigger only like it should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions