///<summary>
 /// Assigns values to a subset of fields of this struct. This subset usually contains common field shared with
 /// another struct.
 ///</summary>
 public void SetBase(ControllerCollision value)
 {
     position     = value.position;
     normal       = value.normal;
     motionDir    = value.motionDir;
     motionAmount = value.motionAmount;
 }
Beispiel #2
0
 private void GetController()
 {
     //  Left
     if (gameObject == GL.L_controller_GO)
     {
         controller         = GL.L_controller;
         controller_name    = "Left";          /// Debug
         otherController_GO = GL.R_controller_GO;
         otherCC            = otherController_GO.GetComponent <ControllerCollision>();
     }
     //  Right
     else
     {
         controller         = GL.R_controller;
         controller_name    = "Right";          /// Debug
         otherController_GO = GL.L_controller_GO;
         otherCC            = otherController_GO.GetComponent <ControllerCollision>();
     }
 }
Beispiel #3
0
    public void ResetBallButton()     // Release ball which if holding and reset it
    {
        Debug.Log("Reset Ball Button pressed");
        ControllerCollision L_controllerCollision = L_controller_GO.GetComponent <ControllerCollision>();
        ControllerCollision R_controllerCollision = R_controller_GO.GetComponent <ControllerCollision>();

        if (L_controllerCollision.holdingObject == ball.gameObject)
        {
            Debug.Log("Releasing Ball from Left hand");
            L_controllerCollision.ReleaseObject();
            L_controllerCollision.RemoveBallFromCollision();
        }
        else if (R_controllerCollision.holdingObject == ball.gameObject)
        {
            Debug.Log("Releasing Ball from Right hand");
            R_controllerCollision.ReleaseObject();
            R_controllerCollision.RemoveBallFromCollision();
        }
        ResetBall();
    }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        rightControllerCollision = rightControllerObject.GetComponent <ControllerCollision>();
        //leftControllerObject.GetComponent<VRTK_ControllerEvents>().TriggerClicked += new ControllerInteractionEventHandler(LeftTriggerClicked);
        rightControllerObject.GetComponent <VRTK_ControllerEvents>().TriggerClicked += new ControllerInteractionEventHandler(RightTriggerClicked);
        rightControllerObject.GetComponent <VRTK_ControllerEvents>().GripPressed    += new ControllerInteractionEventHandler(GripClicked);

        /*      placeButton(2,4,90,0,false);
        *       placeButton(2,3,90,90,false);
        *       placeButton(2,3,90,180,false);
        *       placeButton(2,1,90,270,false); */
        parent.transform.position = rightControllerObject.transform.position;
        parent.transform.parent   = rightControllerObject.transform;
        List <string> bigButtons = new List <string>();

        bigButtons.Add("price");
        bigButtons.Add("date");
        bigButtons.Add("houseType");
        bigButtons.Add("area");
        placeButton(1.5f, 4, 360, 0, true, bigButtons);
        rightmenuActive  = true;
        dataloggerScript = dataloggerHolder.GetComponent <DataLogger>();
    }