bool Y { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Y property of the PhysicsLock struct is a boolean value that determines whether the Y-axis of a physics object is locked. When set to true, the object is restricted from moving along the Y-axis, effectively preventing any translation in that direction. This can be useful in scenarios where you want to constrain an object's movement to a specific plane or axis.

Usage

To use the Y property, you need to have an instance of the PhysicsLock struct. You can then set or get the value of Y to control the locking behavior of the Y-axis for the associated physics object.

Example usage:

PhysicsLock lockSettings = new PhysicsLock();
lockSettings.Y = true; // Lock the Y-axis

In this example, the Y-axis is locked, preventing any movement along that axis.

Example

PhysicsLock lockSettings = new PhysicsLock();
lockSettings.Y = true; // Lock the Y-axis

// Check if the Y-axis is locked
if (lockSettings.Y)
{
    // Perform actions knowing the Y-axis is locked
}