The Radius
property of the ManualHitbox
class specifies the radius of the hitbox when the shape is set to a spherical form. This property is used to determine the size of the hitbox in relation to the target GameObject
it is associated with.
The Radius
property of the ManualHitbox
class specifies the radius of the hitbox when the shape is set to a spherical form. This property is used to determine the size of the hitbox in relation to the target GameObject
it is associated with.
To use the Radius
property, you need to have an instance of the ManualHitbox
component attached to a GameObject
. You can then set or get the radius value to adjust the size of the hitbox.
// Example of setting the Radius property // Assume 'hitbox' is an instance of ManualHitbox ManualHitbox hitbox = new ManualHitbox(); // Set the radius of the hitbox to 5.0f hitbox.Radius = 5.0f; // Retrieve the current radius of the hitbox float currentRadius = hitbox.Radius; // Output the current radius // Note: Avoid using Console.WriteLine in Sandbox // Instead, use in-game debugging tools or UI elements to display this information