Hey,
so I’m trying to reset the rotation of my board-gameobject, with walls as child-objects. There is a ball which the user navigates around a labyrinth and if the ball hits a hole - the ball should have its velocity and position reset and the board should have it rotation reset.
For some reason, I cannot reset the rotation of the board in my Reset-method, which is called when a hole is hit.
this is my code:
public void Reset(){
print ("Reset-method called");
count++;
setCountText ();
board.transform.rotation = Quaternion.identity;
ball.GetComponent<Rigidbody>().velocity = Vector3.zero;
ball.GetComponent<Rigidbody>().angularVelocity = Vector3.zero;
ball.transform.position = new Vector3 (startZone.transform.position.x, ballY, startZone.transform.position.z);
}