Vector3 Scale

robot_2Generated
code_blocksInput

Description

The Scale field of the Transform struct represents the scale component of a transform in 3D space. It is a Vector3 type, allowing for non-uniform scaling along the x, y, and z axes. This field does not directly affect the Position or Rotation fields of the Transform.

Usage

Use the Scale field to adjust the size of an object in 3D space. You can set each component of the Vector3 individually to achieve non-uniform scaling, or set them all to the same value for uniform scaling.

Example

// Example of setting the Scale field of a Transform
Transform myTransform = new Transform();
myTransform.Scale = new Vector3(2.0f, 2.0f, 2.0f); // Uniform scaling

// Non-uniform scaling
myTransform.Scale = new Vector3(1.0f, 2.0f, 0.5f);