Hi everybody. Does somebody know how to set center of object rotation from inside script? I have got a level and a ball inside. I need to rotate the level around the ball. Thank you for your tips.
You can use RotateAround
method to rotate your level around the ball.
transform.RotateAround(ball.transform.position, axis, speed * Time.deltaTime);
where axis
is the axis of rotation, you can use Vector3.up, Vector3.down, Vector3.fwd etc
.