Take a look at the attached images.
While rotatating the frame box, I need the yellow cubes(Rigidbody) to fall down directly, without any change about x axis.
I’ve ever tried this, however it doesn’t work well.
void Update () {
thisPosition = transform.position;
thisPosition.z = 0;
thisPosition.x = Mathf.RoundToInt(thisPosition.x);
transform.position = thisPosition;
}
I wonder if I could configure the physics settings to disable the rebounding of rigidbody.
Any advise?
