Garry's Mod Wiki

PhysObj:CalculateVelocityOffset

Vector, Vector PhysObj:CalculateVelocityOffset( Vector force, Vector pos )

Description

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

This will return zero length vectors if the physics object's motion is disabled. See PhysObj:IsMotionEnabled.

Arguments

1 Vector force
The initial force
2 Vector pos
The location of the force in world coordinates

Returns

1 Vector
The calculated linear velocity from the force on the physics object's center of mass
2 Vector
The calculated angular velocity from the force on the physics object's center of mass

Page Links


Special Pages


Wikis

?

Render Time: 68ms

DB GetPage 39
Generate Html 7
SaveChanges (1) 13
Render Body 0
Render Sidebar 6