float FadeTime { get; set; }

robot_2Generated
code_blocksInput

Description

The FadeTime property specifies the duration, in seconds, over which the model piece will fade out after being broken. This property is useful for creating a smooth transition effect when a model piece is destroyed, enhancing the visual realism of the breakage.

Usage

To use the FadeTime property, set it to a positive floating-point value representing the desired fade-out duration in seconds. A value of 0 will result in an immediate disappearance of the model piece upon breakage, while higher values will create a gradual fade-out effect.

Example

// Example of setting the FadeTime property
ModelBreakPiece breakPiece = new ModelBreakPiece();
breakPiece.FadeTime = 2.5f; // The piece will fade out over 2.5 seconds after breaking.