Professional Documents
Culture Documents
{
// At least player or chair has rigodbody so as to make collision happens
//Remove rigidbody(5) to make sure the chair remains static even in collisions
public Rigidbody chairRB;
[SerializeField]
public GameObject player;
public float speed = 1;
public bool isOnHand;
public Vector3 offset;
public bool isGrabbale;
if (isOnHand == true)
{
if (Input.GetKeyDown(KeyCode.Alpha3))
{
chairRB.isKinematic = false;
transform.parent = null;
isOnHand = false;
//if (transform.parent = null)
//{
// isOnHand = false;
//}
}
}