Description
The Local
method of the PhysicsPoint
struct is a static method used to create a PhysicsPoint
that is defined relative to a given PhysicsBody
. This method allows you to specify a local position and rotation, which are optional, to define the point's offset from the body's origin.
Usage
To use the Local
method, you need to provide a PhysicsBody
instance. Optionally, you can also provide a Vector3
for the local position and a Rotation
for the local rotation. If these are not provided, the point will default to the body's origin with no rotation.
Example usage:
PhysicsBody myBody = new PhysicsBody();
Vector3? localPos = new Vector3(1.0f, 0.0f, 0.0f);
Rotation? localRot = Rotation.FromAxis(Vector3.Up, 45);
PhysicsPoint point = PhysicsPoint.Local(myBody, localPos, localRot);
Example
PhysicsBody myBody = new PhysicsBody();
Vector3? localPos = new Vector3(1.0f, 0.0f, 0.0f);
Rotation? localRot = Rotation.FromAxis(Vector3.Up, 45);
PhysicsPoint point = PhysicsPoint.Local(myBody, localPos, localRot);