Garry's Mod Wiki

Revision Difference

PhysObj:CalculateVelocityOffset#510912

<function name="CalculateVelocityOffset" parent="PhysObj" type="classfunc">⤶ <description>Calculates the linear and angular velocities on the center of mass for an offset force impulse. The outputs can be directly passed to <page>PhysObj:AddVelocity</page> and <page>PhysObj:AddAngleVelocity</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 linear velocity from the force on the physics object's center of mass</ret>⤶ <ret name="" type="Vector">The calculated angular velocity from the force on the physics object's center of mass</ret>⤶ </rets>⤶ </function>⤶ ⤶