The Surfaces
property of the PhysicsShape
class provides access to an array of Surface
objects. These surfaces are referenced by mesh or heightfield collision, allowing for detailed interaction with the physical environment.
The Surfaces
property of the PhysicsShape
class provides access to an array of Surface
objects. These surfaces are referenced by mesh or heightfield collision, allowing for detailed interaction with the physical environment.
Use the Surfaces
property to retrieve or manipulate the surfaces associated with a PhysicsShape
. This can be useful for customizing the physical interactions of a shape, such as adjusting friction or other surface properties.
// Example of accessing the Surfaces property PhysicsShape shape = new PhysicsShape(); Surface[] surfaces = shape.Surfaces; // Iterate through the surfaces and perform operations foreach (var surface in surfaces) { // Example: Print the surface material string material = surface.Material; // Perform other operations with the surface }