Description
The Scale
property of the VRInput
class allows you to get or set the player's scale within the virtual world. This property is useful for adjusting the player's perceived size in the VR environment. For example, setting the scale to 2 will make the player appear twice as large as the default size.
Usage
To use the Scale
property, you can access it through an instance of the VRInput
class. You can both retrieve the current scale and assign a new scale value to change the player's size in the VR world.
Example
// Example of setting the player's scale to twice the normal size
VRInput.Current.Scale = 2.0f;
// Example of retrieving the current scale
float currentScale = VRInput.Current.Scale;
// Output the current scale
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use in-game UI or logging mechanisms to display information
// Log.Info($"Current player scale: {currentScale}");