Dear coding bros, I’m an absolute Unity noob. Could you be so kind and explain when it’s better to use one and when the other of these two approaches? And what difference does it make? transform.rotation vs. transform.Rotate Thank you all.

Thank you all for your replies, but I think I need to elaborate on my question:
WHY would anybody use a ROTATION instead of ROTATE…and in WHAT cases EXACTLY.
WHEN is it better to use ROTATION, when we already have ROTATE.
Because I know that a gameObject can be rotated by it’s transform using both.
Give some brief examples of both cases, please.

Easy way of puting it is that transfrom.rotation is used to rotate at a specific angle an object,while transform.Rotate can cause the object to rotate continuously.And by the way there is one you missed transform.RotateAround that can make the object rotate around another object or an axis.

You are mixing apples and oranges here. Transform.rotation is a Quaternion…an non-intuitive 4D construct. Unless you have a firm understanding of Quaternions, you should not assign to it directly. You can use the Quaternion class to construct many rotations and assign them. There is a Transform.eulerAngles that can be assigned to that makes a better comparison.

The typical properties that make Transform.Rotate() special vs. other forms of rotation are:

1. By default rotates around the local axes. Most other rotations default to using world axes.
2. It is a delta rotation. It rotates an object by a certain number of degrees. Most other methods of rotating an object are by default are absolute rotations. That is an object is placed in a specific rotation.

Rotations can be complicated, and there are all sorts of ways of implementing various rotations.

Rotation will set the objects rotation to that specified rotation. (As robertbu said, this should only be used by advanced users)

Rotate will take the current objects rotation and change it by the specified amount of rotation(Space.Self). (Useful for turning objects such as spinning or turning a car)

Rotate can also be used to rotate around other objects(Space.World). (Useful for rotating camera around player or orbiting planets.)

trasnform.rotation take Quaternion , i think you should ask for trasnform.eulerAngles vs transform.Rotate here i an example - i want to move my player as my camera is moving (using cinemachine freeLookCamera) for i take the value of X-Axis from the freeLookCamera component and put this value to the player

``````void PlayerRotation() {
float angleY = cinemachineFreeLook.m_XAxis.Value;
Vector3 angle = new Vector3(0, 1, 0) * angleY;
if (transform.eulerAngles.y != angleY) {
//this.transform.Rotate(angle);
transform.eulerAngles = angle;
}
}
``````

i am calling this function in FixedUpdate() method when i use transform.Rotate player continuously rotating base on angle but when i use transform.eulerAngles it only rotate when the camera is rotated.