Garry's Mod Wiki

Revision Difference

PhysObj:CalculateForceOffset#510913

<function name="CalculateForceOffset" parent="PhysObj" type="classfunc">⤶ <description>Calculates the force and torque on the center of mass for an offset force impulse. The outputs can be directly passed to <page>PhysObj:ApplyForceCenter</page> and <page>PhysObj:ApplyTorqueCenter</page>, respectively.</description>⤶ <realm>Shared</realm>⤶ <args>⤶ <arg name="force" type="Vector">The initial force</arg>⤶ <arg name="pos" type="Vector">The location of the force in world coordinates</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="Vector">The calculated force on the physics object's center of mass</ret>⤶ <ret name="" type="Vector">The calculated torque on the physics object's center of mass</ret>⤶ </rets>⤶ </function>⤶ ⤶