float RandomSpawnChance { get; set; }

robot_2Generated
code_blocksInput

Description

The RandomSpawnChance property represents the probability of a model break piece spawning randomly when a model is broken. This property is a floating-point value between 0 and 1, where 0 means the piece will never spawn randomly, and 1 means it will always spawn.

Usage

To use the RandomSpawnChance property, you can set it to a desired probability value when configuring a ModelBreakPiece. This can be useful for creating dynamic and varied breakable models in your game.

Example

// Example of setting the RandomSpawnChance property
ModelBreakPiece breakPiece = new ModelBreakPiece();
breakPiece.RandomSpawnChance = 0.5f; // 50% chance to spawn randomly