Hello! I am using Orion for a small project.
I'm trying to create a scene with a "pinch" mode and a "grab" mode. In one mode you can only pick up blocks with pinch, the other only with grab. No other interactions should be possible with the blocks other than pinch or grab according to the mode selected (Shouldn't be able to "push" blocks around)
As it stands I have a block in a scene ad a UI element outputting the grab and pinch strength streams. I can pick up the block as you would expect and am using the Grabbing Hand script that has some magnetizing going on for pinch.
To try and "turn off" the ability to pinch pick up a block I have it so that OnReleas is called all the time via FixedUpdate. This does make it substantially harder. yet not impossible, to pinch pick up an object. How do I make it impossible so that you can only pick up an object with grab and then also vice versa, only with pinch?
Thanx
protected void OnRelease() {
if (active_object_ != null) {
// Notify the grabbable object that is was released.
GrabbableObject grabbable = active_object_.GetComponent();
if (grabbable != null)
grabbable.OnRelease();
if (grabbable == null || grabbable.rotateQuickly)
active_object_.GetComponent<Rigidbody>().maxAngularVelocity = last_max_angular_velocity_;
Leap.Utils.IgnoreCollisions(gameObject, active_object_.gameObject, false);
}
active_object_ = null;
Hover();
}