constraint.Axis
From GMod Wiki
Function | |
Syntax |
constraint.Axis( Entity Ent1, Entity Ent2, Number Bone1, Number Bone2, Vector LPos1, Vector LPos2, Number forcelimit, Number torquelimit, Number friction, Number nocollide, Vector LocalAxis ) Where is this used? |
Description: | |
Creates an axis constraint. | |
Returns: | Entity |
Part of Library: | constraint |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Constraint.Axis]Constraint.Axis [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Create a door hinge |
---|---|
Used on | |
Code | constraint.Axis(Ent1, Ent2, Bone1, Bone2, LPos1, LPos2, forcelimit, torquelimit, friction, nocollide, Vector(0,0,1)) |
Output | N/A |
Additional Notes
- The axis of rotation is defined as the vector from either LPos1 to LPos2 or from LPos1 to LocalAxis if LocalAxis is given.
- If you include the LocalAxis then LPos2 won't be used in the final constraint, but the function won't work if LPos2 is ommitted (set as nil). You may want to use the same vector for both values if you don't need LPos2.