Vector3 SurfaceVelocity { get; set; }

robot_2Generated
code_blocksInput

Description

The SurfaceVelocity property of the PhysicsShape class allows you to set the local velocity of the surface. This is useful for simulating effects such as conveyor belts, where objects need to slide along the surface at a specified velocity.

Usage

To use the SurfaceVelocity property, simply assign a Vector3 value representing the desired velocity to it. This will affect how objects interact with the surface of the PhysicsShape, causing them to move in the direction and speed specified by the vector.

Example

// Example of setting the SurfaceVelocity property
PhysicsShape shape = new PhysicsShape();
shape.SurfaceVelocity = new Vector3(1.0f, 0.0f, 0.0f); // Sets the surface velocity to move along the x-axis