Description
The Z
property of the PhysicsLock
struct is a boolean value that determines whether the Z-axis is locked for a physics object. When set to true
, the object is restricted from moving along the Z-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 Z
property, you need to have an instance of the PhysicsLock
struct. You can then set or get the value of Z
to control the locking behavior on the Z-axis.
Example usage:
PhysicsLock lockSettings = new PhysicsLock();
lockSettings.Z = true; // Lock the Z-axis
// Check if the Z-axis is locked
bool isZLocked = lockSettings.Z;
Example
PhysicsLock lockSettings = new PhysicsLock();
lockSettings.Z = true; // Lock the Z-axis
// Check if the Z-axis is locked
bool isZLocked = lockSettings.Z;