constraint.Keepupright

From Garry's Mod
Jump to: navigation, search
 constraint.Keepupright( )

Contents

Description

Creates a keep upright constraint.

NOTE

This function only works on prop_physics or prop_ragdoll.

Arguments

Entity ent

The entity to keep upright

Arguments

Angle ang

The angle defined as "upright"

Arguments

number bone

The bone of the entity to constrain (0 for boneless)

Arguments

number angularLimit

Basically, the strength of the constraint

Returns

Entity

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

Examples

Example

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

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


Personal tools
Navigation