Description
The BodyGroups
property of the ModelRenderer
class is used to manage the body group settings of a model. Body groups allow you to enable or disable certain parts of a model, which can be useful for customizing the appearance of a model without needing multiple separate models.
Usage
To use the BodyGroups
property, you can get or set its value to control which body groups are active on the model. The property is of type System.UInt64
, which means it can represent a large number of possible body group configurations.
When setting the BodyGroups
property, ensure that the model supports the body groups you are trying to configure. You can use the HasBodyGroups
property to check if the model has any body groups available.
Example
// Example of setting body groups on a ModelRenderer
ModelRenderer modelRenderer = new ModelRenderer();
// Check if the model has body groups
if (modelRenderer.HasBodyGroups)
{
// Set the body groups using a bitmask
modelRenderer.BodyGroups = 0b0001; // Example bitmask
}
// Retrieve the current body group configuration
ulong currentBodyGroups = modelRenderer.BodyGroups;
// Output the current body group configuration
// Note: Use a logging system instead of Console.WriteLine
// Log.Info($"Current Body Groups: {currentBodyGroups}");