Description
The SurfaceVelocity
property of the HammerMesh
class is used to set the local velocity of the surface. This allows objects to slide along the surface, similar to how a conveyor belt operates. This property is particularly useful in scenarios where you want to simulate movement or transport of objects across a surface without applying direct forces to the objects themselves.
Usage
To use the SurfaceVelocity
property, you need to assign a Vector3
value that represents the desired velocity direction and magnitude. This property is part of the HammerMesh
component, which is automatically added to GameObjects with a map mesh in the Sandbox environment.
Example usage:
HammerMesh hammerMesh = new HammerMesh();
hammerMesh.SurfaceVelocity = new Vector3(1.0f, 0.0f, 0.0f); // Sets the surface velocity to move objects along the x-axis
Example
HammerMesh hammerMesh = new HammerMesh();
hammerMesh.SurfaceVelocity = new Vector3(1.0f, 0.0f, 0.0f); // Sets the surface velocity to move objects along the x-axis