Closed nantianliao closed 4 years ago
@nantianliao To my understanding, you would like multiple buttons to perform like Trigger button? For example, trigger button can grab an object, you would also like to grab with touchpad or grip button?
@nantianliao To my understanding, you would like multiple buttons to perform like Trigger button? For example, trigger button can grab an object, you would also like to grab with touchpad or grip button?
@chengnay Yes, What should I do about this situation?
You might need to modify BasicGrabbable.cs script, For example, [SerializeField] private ColliderButtonEventData.InputButton m_grabButton1 = ColliderButtonEventData.InputButton.Trigger; [SerializeField] private ColliderButtonEventData.InputButton m_grabButton2 = ColliderButtonEventData.InputButton.PadOrStick;
Under OnColliderEventDragStart function, if (eventData.button != m_grabButton1 && eventData.button != m_grabButton2) { return; }
I will attach my sample script for your reference. BasicGrabbable.zip
@chengnay Thank you for your answer. Your reply helped me to solve the problem. My requirement is not to use the second trigger button to grab objects, but to use the second trigger button to interact with the UI. Now I've added a second trigger button to vive raycaster.cs to implement my requirement.
@nantianliao If your problem is solved, please help to close this issue, thanks!
What should I do to be like this? It can be configured with multiple trigger buttons.