Description
The Offset
property of the ModelBreakPiece
struct represents the positional offset of a breakable piece in a 3D space. This property is of type Vector3
, which typically includes three components: X, Y, and Z, corresponding to the three-dimensional coordinates.
Usage
Use the Offset
property to specify or retrieve the position offset of a model piece relative to its origin. This can be useful when you need to adjust the position of a piece within a model, such as when setting up breakable parts in a game environment.
Example
// Example of setting the Offset property
ModelBreakPiece piece = new ModelBreakPiece();
piece.Offset = new Vector3(1.0f, 2.0f, 3.0f);
// Example of getting the Offset property
Vector3 currentOffset = piece.Offset;
// Use the Offset to adjust the position of the piece
piece.Offset += new Vector3(0.5f, 0.0f, -0.5f);