The WorldScale
property represents the scale of the game object in world coordinates. This property is part of the Component
class in the Sandbox framework and is used to determine how the game object is scaled relative to the world space.
The WorldScale
property represents the scale of the game object in world coordinates. This property is part of the Component
class in the Sandbox framework and is used to determine how the game object is scaled relative to the world space.
Use the WorldScale
property to get or set the scale of a game object in world space. This is useful when you need to adjust the size of an object in the game world, ensuring it appears correctly relative to other objects and the environment.
// Example of setting the WorldScale of a component Component myComponent = new Component(); myComponent.WorldScale = new Vector3(2.0f, 2.0f, 2.0f); // Sets the world scale to double the size in all dimensions // Example of getting the WorldScale of a component Vector3 currentScale = myComponent.WorldScale; Console.WriteLine($"Current World Scale: {currentScale}");