PhysObj:GetEnergy
Description
Returns the sum of the linear and rotational kinetic energies of the physics object.
Returns
Example
Replicates what GetEnergy does internally.
local linear_kenergy = 0.5 * phys:GetMass() * phys:GetVelocity() ^ 2 -- 1/2 mv^2
local rotational_kenergy = 0.5 * phys:GetInertia() * phys:GetAngleVelocity() ^ 2 -- 1/2 Iw^2
local kenergy = linear_kenergy + rotational_kenergy