The PlacementBone
property specifies the name of the bone where the model piece should be placed. This is used in the context of a breakable model, where each piece can be associated with a specific bone for accurate placement and animation.
The PlacementBone
property specifies the name of the bone where the model piece should be placed. This is used in the context of a breakable model, where each piece can be associated with a specific bone for accurate placement and animation.
To use the PlacementBone
property, assign it a string value representing the name of the bone in the model where the piece should be attached. This is particularly useful when setting up complex models with multiple breakable parts that need to be precisely positioned.
// Example of setting the PlacementBone property ModelBreakPiece piece = new ModelBreakPiece(); piece.PlacementBone = "spine_01"; // Assign the bone name where the piece should be placed // Further configuration of the piece piece.PieceName = "ArmPiece"; piece.Model = "models/arm_piece.vmdl"; piece.Offset = new Vector3(0, 0, 0); piece.FadeTime = 1.0f; piece.RandomSpawnChance = 0.5f;