Garry's Mod Wiki

constraint.Keepupright

Entity constraint.Keepupright( Entity ent, Angle ang, number bone, number angularLimit )

Description

Creates a keep upright constraint.

This function only works on prop_physics or prop_ragdoll.

Arguments

1 Entity ent
The entity to keep upright
2 Angle ang
The angle defined as "upright"
3 number bone
The bone of the entity to constrain (0 for boneless)
4 number angularLimit
Basically, the strength of the constraint

Returns

1 Entity
The created constraint, if any or false if the constraint failed to set

Example

From properties/keep_upright.lua (the right click menu)

constraint.Keepupright( ent, Phys:GetAngles(), 0, 999999 )

Page Links


Special Pages


Wikis

?

Render Time: 35ms

DB GetPage 2
Generate Html 12
SaveChanges (1) 8
Render Body 0
Render Sidebar 11