The LocalCameraTransform
property provides the transform of the camera in local space. This property is useful for obtaining the camera's position, rotation, and scale relative to its parent object or local coordinate system.
The LocalCameraTransform
property provides the transform of the camera in local space. This property is useful for obtaining the camera's position, rotation, and scale relative to its parent object or local coordinate system.
Use the LocalCameraTransform
property when you need to work with the camera's transform in a local context, such as when performing operations that require local positioning or orientation adjustments.
// Example of accessing the LocalCameraTransform property Transform localTransform = Gizmo.LocalCameraTransform; // Use the local transform to perform operations Vector3 localPosition = localTransform.Position; Rotation localRotation = localTransform.Rotation; // Example of modifying the local transform localTransform.Position += new Vector3(1, 0, 0); // Move the camera 1 unit along the local X axis localTransform.Rotation *= Rotation.FromAxis(Vector3.Up, 45); // Rotate the camera 45 degrees around the local Y axis