PhysObj.Wake

From GMod Wiki

Revision as of 18:57, 29 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax PhysObj:Wake( )
Description:
Wakes a previously sleeping physical object. If a physical object is asleep, it has no velocity, but can be awoken with force, or this function.
Returns: nil
In Object: Physobj
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=PhysObj.Wake]PhysObj.Wake [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionWakes a previously sleeping object.
Used onNewerShared.png
Code
tr = player1.GetEyeTrace()
if (tr.HitNonWorld) then
ent1 = tr.Entity
phys1 = ent1:GetPhysicsObject()
phys1:Sleep()
...
phys1:Wake()
end
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox