Exemple #1
0
    public override void OnSelected(VRInteraction caller)
    {
        base.OnSelected(caller);
        HandController_Ray rayCtrl = caller as HandController_Ray;

        if (rayCtrl != null)
        {
            referencePos = tRoot.position;
            rayCtrl.SetRenderLine(false);
            currSelectingCtrl = rayCtrl;
        }
    }
Exemple #2
0
    public override void OnDeselected(VRInteraction caller)
    {
        base.OnDeselected(caller);
        HandController_Ray rayCtrl = caller as HandController_Ray;

        if (rayCtrl != null)
        {
            rayCtrl.SetRenderLine(true);
            currSelectingCtrl = null;

            rby.useGravity  = true;
            rby.isKinematic = false;
        }
    }