コード例 #1
0
    void Start()
    {
        controller = GetComponent <ViveGrip_ControllerHandler>();
        GameObject gripSphere = InstantiateTouchSphere();

        touch        = gripSphere.AddComponent <ViveGrip_TouchDetection>();
        touch.radius = touchRadius;
    }
コード例 #2
0
 void CheckController()
 {
     if (controller != null)
     {
         return;
     }
     controller = GetComponent <ViveGrip_ControllerHandler>();
 }
コード例 #3
0
 void ViveGripInteractionStart(ViveGrip_GripPoint gripPoint)
 {
     if (gripPoint.HoldingSomething())
     {
         bubbling   = true;
         controller = gripPoint.controller;
     }
 }
コード例 #4
0
    void Start()
    {
        controller = GetComponent <ViveGrip_ControllerHandler>();
        grabber    = gameObject.AddComponent <ViveGrip_Grabber>();
        GameObject gripSphere = InstantiateTouchSphere();

        touch = gripSphere.AddComponent <ViveGrip_TouchDetection>();
        UpdateRadius(touchRadius, holdRadius);
    }
コード例 #5
0
 void ViveGripGrabStop()
 {
     controller = null;
     leverRigidBody.isKinematic = true;
 }
コード例 #6
0
 void ViveGripGrabStart(ViveGrip_GripPoint gripPoint)
 {
     controller = gripPoint.controller;
     leverRigidBody.isKinematic = false;
 }
コード例 #7
0
 void ViveGripGrabStop()
 {
     controller = null;
 }
コード例 #8
0
 void ViveGripGrabStart(ViveGrip_GripPoint gripPoint)
 {
     controller = gripPoint.controller;
 }
コード例 #9
0
 void ViveGripGrabStop()
 {
     controller = null;
     otherHandle.isKinematic = true;
     thisHandle.isKinematic  = true;
 }
コード例 #10
0
 void ViveGripGrabStart(ViveGrip_GripPoint gripPoint)
 {
     controller = gripPoint.controller;
     otherHandle.isKinematic = false;
     thisHandle.isKinematic  = false;
 }
コード例 #11
0
 void ViveGripGrabStop()
 {
     controller = null;
     sliderRigidbody.isKinematic = true;
 }
コード例 #12
0
 void StopFiring()
 {
     bubbling   = false;
     controller = null;
     cooldown   = 0f;
 }
コード例 #13
0
 //appeler quand lache l'objet
 void ViveGripGrabStop(ViveGrip_GripPoint gripPoint)
 {
     //attachedGripPoints.Remove(gripPoint);
     controller = null;
 }
コード例 #14
0
 void ViveGripGrabStart(ViveGrip_GripPoint gripPoint)
 {
     //attachedGripPoints.Add(gripPoint);
     controller = gripPoint.controller;
 }