Transform
How to use the Transform component to Position, Rotate and Scale a GameObject!
The Transform Component determines the Position, Rotation, and Scale of each object in the scene. Every GameObject has a Transform.
It contains useful functions such as Rotate, LookAt and Translate. And also useful variables such as position, rotation and forward.
Examples
Shortcut variable
Because Transform is a common component, there is a shortcut property available to access it in any MonoBehaviour.
This will save you having to use GetComponent.
Using the shortcut:
Without using the shortcut:
Notes
- …