Description
The Surface
property of the Collider
class in the Sandbox framework represents the surface characteristics of the collider. This property is of type Sandbox.Surface
, which typically includes details such as texture, friction, and other physical properties that define how the collider interacts with other objects in the scene.
Usage
To use the Surface
property, you can get or set it to define or modify the surface characteristics of a collider. This can be useful for customizing how objects interact with the collider, such as changing the friction or bounciness of the surface.
Example usage:
Collider myCollider = new Collider();
myCollider.Surface = new Surface();
myCollider.Surface.Friction = 0.5f; // Set the friction of the surface
Example
Collider myCollider = new Collider();
myCollider.Surface = new Surface();
myCollider.Surface.Friction = 0.5f; // Set the friction of the surface