Browsing StarfallEx's section
โ† Back to ACE
Back to StarfallEx

SFEX.PhysObj:calculateVelocityOffset

S๐Ÿท๏ธ PhysObj

Part of StarfallEx namespace

๐Ÿ”— External
PhysObj:calculateVelocityOffset(impulse, position)
View on GitHub|lua/starfall/libs_sh/physobj.lua:614
๐Ÿ“‹ Has LDoc๐Ÿ‘๏ธ 0 viewsUpdated 2 months ago

Description

Calculates the linear and angular velocities on the center of mass for an offset impulse. The outputs can be directly passed to PhysObj:addVelocity and PhysObj:addAngleVelocity, respectively.

Parameters

NameTypeDescription
impulseVectorThe impulse acting on the object in world coordinates (kg*source_unit/s)
positionVectorThe location of the impulse in world coordinates

Returns

TypeDescription
VectorThe calculated linear velocity from the impulse on the physics object's center of mass in source_unit/s. (World frame)
VectorThe calculated angular velocity from the impulse on the physics object's center of mass in degrees/s. (Local frame)

Examples

No examples available.

Used In

No usages found in the codebase.