void Awake() { inputs = GetComponent <VRHandInputs>(); platformGrabParticle = transform.Find("ParticleToTarget").gameObject; particleToTarget = platformGrabParticle.GetComponent <ParticleToTarget>(); m_Joint = GetComponent <FixedJoint>(); scale = GetComponentInParent <VRPlayerScale>(); handCollider = GetComponent <Collider>(); handCollider.isTrigger = true; //Physics.IgnoreLayerCollision(12,11); }
private void Start() { inputs = GetComponent <VRHandInputs>(); networkVRPlayer = transform.parent.GetComponent <NetworkVRPlayer>(); m_Pointer = Instantiate(m_Pointer); VRFlask = GameObject.FindGameObjectWithTag("VRFlask"); VRFlaskScript = VRFlask.GetComponent <VRFlask>(); moveVRFlask = VRFlask.GetComponent <MoveVRFlask>(); flaskRB = VRFlask.GetComponent <Rigidbody>(); scaler = GetComponentInParent <VRPlayerScale>(); //move to flask at beginning MoveInFlask(); }