private void OnTriggerExit(Collider other) { LocalPhysicsGrid localPhysicsGrid = other.GetComponent <LocalPhysicsGrid>(); if (localPhysicsGrid != null) { Debug.Log("Exited Volume"); _currentGravityParent = null; transform.parent = null; } }
private void OnTriggerEnter(Collider other) { LocalPhysicsGrid localPhysicsGrid = other.GetComponent <LocalPhysicsGrid>(); if (localPhysicsGrid != null) { Debug.Log("Entered Volume"); _currentGravityParent = localPhysicsGrid.transform; transform.SetParent(localPhysicsGrid.transform, true); } }