PhysObj.GetEnergy

From GMod Wiki

Revision as of 18:49, 29 May 2010 by Disseminate (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax PhysObj:GetEnergy( )
Description:
Gets how much energy is in a physobj (seems to be based on velocity and angular velocity).
Returns: Integer
In Object: PhysObj
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=PhysObj.GetEnergy]PhysObj.GetEnergy [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGets the current energy of a physics object
Used onNewerShared.png
Code
 
local trace = Player:GetEyeTraceNoCursor();
Msg( trace.Entity:GetPhysicsObject():GetEnergy() );
 
OutputTrace object's energy
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox