Description
The World
method of the PhysicsPoint
struct is used to create a physics point in world space. This method allows you to specify a physics body and optionally provide a world position and rotation for the point. It is useful for defining points in the physics simulation that are not necessarily tied to the local space of the body.
Usage
To use the World
method, you need to pass a PhysicsBody
instance as the first parameter. Optionally, you can provide a Vector3
for the world position and a Rotation
for the world rotation. If these are not provided, the method will use default values.
Example usage:
PhysicsBody myBody = new PhysicsBody();
Vector3? position = new Vector3(1.0f, 2.0f, 3.0f);
Rotation? rotation = Rotation.From(45.0f, 0.0f, 0.0f);
PhysicsPoint point = PhysicsPoint.World(myBody, position, rotation);
Example
PhysicsBody myBody = new PhysicsBody();
Vector3? position = new Vector3(1.0f, 2.0f, 3.0f);
Rotation? rotation = Rotation.From(45.0f, 0.0f, 0.0f);
PhysicsPoint point = PhysicsPoint.World(myBody, position, rotation);