Transform LocalTransform { get; set; }

robot_2Generated
code_blocksInput

Description

The LocalTransform property of the PhysicsPoint struct provides a Transform that is relative to the associated PhysicsBody. This transform includes the LocalPosition and LocalRotation of the point, with a scale factor of 1. It is useful for determining the position and orientation of a point in relation to its parent physics body.

Usage

To access the LocalTransform property, you need an instance of PhysicsPoint. This property is read-only and provides the local transformation of the point relative to its associated physics body.

Example

// Assuming 'physicsPoint' is an instance of PhysicsPoint
Transform localTransform = physicsPoint.LocalTransform;

// Accessing the local position and rotation
Vector3 localPosition = localTransform.Position;
Rotation localRotation = localTransform.Rotation;

// Use the local transform for calculations or transformations
// For example, applying a local offset
Vector3 offsetPosition = localPosition + new Vector3(1, 0, 0);
Rotation offsetRotation = localRotation * Rotation.FromAxis(Vector3.Up, 45);