The LocalRotation
field represents the rotation offset from the position of the physics body to which this PhysicsPoint
is attached. It is a public instance field of type Rotation
and is part of the Sandbox.Physics.PhysicsPoint
structure.
The LocalRotation
field represents the rotation offset from the position of the physics body to which this PhysicsPoint
is attached. It is a public instance field of type Rotation
and is part of the Sandbox.Physics.PhysicsPoint
structure.
Use the LocalRotation
field to specify or retrieve the rotation offset of a PhysicsPoint
relative to its associated physics body. This is particularly useful when you need to define or manipulate the orientation of a point in relation to the body, such as when setting up joints or other physics-based interactions.
// Example of setting the LocalRotation of a PhysicsPoint PhysicsBody myBody = new PhysicsBody(); PhysicsPoint myPoint = new PhysicsPoint(); // Set the local rotation to a specific value myPoint.LocalRotation = new Rotation(0, 90, 0); // Rotate 90 degrees around the Y-axis // Use the LocalRotation in a physics setup PhysicsJoint myJoint = new PhysicsJoint(); myJoint.Attach(myBody, myPoint);