//Used for initializing board void SnapToNearest() { Vector2 snapPos = hexController.FindNearest((Vector2)this.transform.position); this.transform.position = snapPos; //Snap to x,y position first //this.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 0f)); //Snap to default rotation this.transform.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionX | RigidbodyConstraints.FreezePositionY; currentHex = hexController.GetNearestHex(this.transform.position); }