constraint.Keepupright
Description
Creates a keep upright constraint.
This function only works on prop_physics or prop_ragdoll.
Arguments
Returns
Example
Adds a console command that makes whatever prop the player is looking at to be kept upright.
concommand.Add( "keep_upright",function( ply, cmd, args )
local tr = ply:GetEyeTrace()
local ent = tr.Entity
if ( !IsValid( ent ) ) then return end
constraint.Keepupright( ent, ent:GetAngles(), tr.PhysicsBone, 999999 )
end )