The RenderType
property of the HammerMesh
class specifies how shadows are rendered for the mesh. It is of type Sandbox.ModelRenderer/ShadowRenderType
, which defines the shadow rendering behavior for the associated model.
The RenderType
property of the HammerMesh
class specifies how shadows are rendered for the mesh. It is of type Sandbox.ModelRenderer/ShadowRenderType
, which defines the shadow rendering behavior for the associated model.
Use the RenderType
property to control the shadow rendering behavior of a HammerMesh
component. This property is particularly useful when you want to customize how shadows are cast by the mesh in the scene.
To set the RenderType
, you can assign it a value from the Sandbox.ModelRenderer/ShadowRenderType
enumeration, which includes options such as None
, Static
, and Dynamic
.
// Example of setting the RenderType property HammerMesh hammerMesh = new HammerMesh(); // Set the RenderType to Static to enable static shadow casting hammerMesh.RenderType = Sandbox.ModelRenderer.ShadowRenderType.Static; // Alternatively, set it to Dynamic for dynamic shadow casting hammerMesh.RenderType = Sandbox.ModelRenderer.ShadowRenderType.Dynamic; // Disable shadow casting by setting it to None hammerMesh.RenderType = Sandbox.ModelRenderer.ShadowRenderType.None;