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.
2 Answers
2You 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.
Can you elaborate on the shape of level and its distance from ball? or rather your setupr of level and ball.
– Priyanshu