Need help with Socket Interactor
Im 3 months new to C#. In my VR game, I put in this code so that one hand couldn't grab objects out of the other hand. However, the code now prevents me from grabbing objects from Socket Interactors that are in my scene. The code in on my object.
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.Interaction.Toolkit;
public class TheObject : XRGrabInteractable
public override bool IsSelectableBy(XRBaseInteractor interactor) {
bool isalreadygrabbed = selectingInteractor && !interactor.Equals(selectingInteractor);
return base.IsSelectableBy(interactor) && !isalreadygrabbed;
}
Your answer
Follow this Question
Related Questions
How can I make my VR controller stick to a virtual Joystick and still control it? 1 Answer
I need a completely stationary camera for my VR game 1 Answer
OVR Oculus, Hands issue, cant delete held objects 3 Answers
Using an object transform to trigger a series of blendShapes 1 Answer
if collider != trigger //do stuff 1 Answer