Part of StarfallEx namespace
๐ External
PhysObj:calculateForceOffset(impulse, position)๐ Has LDoc๐๏ธ 0 viewsUpdated 2 months ago
Description
Calculates the linear and angular impulse on the object's center of mass for an offset impulse. The outputs can be used with PhysObj:applyForceCenter and PhysObj:applyTorque, respectively. Be careful to convert the angular impulse to world frame (PhysObj:localToWorldVector) if you are going to use it with applyTorque.
Parameters
| Name | Type | Description |
|---|---|---|
impulse | Vector | The impulse acting on the object in world coordinates (kg*source_unit/s) |
position | Vector | The location of the impulse in world coordinates |
Returns
| Type | Description |
|---|---|
Vector | The calculated linear impulse on the physics object's center of mass in kg*source_unit/s. (World frame) |
Vector | The calculated angular impulse on the physics object's center of mass in kg*m^2*degrees/s. (Local frame) |
Examples
No examples available.
Used In
No usages found in the codebase.