Description
The Friction
property represents the friction coefficient of a surface material in the Sandbox game engine. This value determines how much resistance an object encounters when moving across the surface. It is a crucial factor in simulating realistic physical interactions between objects and surfaces.
Usage
To use the Friction
property, you can get or set its value to adjust the friction level of a surface. The value should be a float
between 0 and 1, where 0 represents no friction (completely slippery) and 1 represents maximum friction (completely sticky).
Example usage:
Surface mySurface = new Surface();
mySurface.Friction = 0.5f; // Sets the friction to a moderate level
float currentFriction = mySurface.Friction; // Retrieves the current friction value
Example
Surface mySurface = new Surface();
mySurface.Friction = 0.5f; // Sets the friction to a moderate level
float currentFriction = mySurface.Friction; // Retrieves the current friction value