Phys hinge: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (removed line)
(inserted easier method of defining hinge axis, as well as an example.)
Line 3: Line 3:
==Entity Description==
==Entity Description==


A physically simulated hinge, rotating entities around an axis. This axis is set either through the helper, or by manually altering the ''hingeaxis'' keyvalue.
A physically simulated hinge, rotating entities around an axis. The axis is the line between the actual point entity and its origin as set in hammer, although it can also be set using the helper. This allows for, essentially, an infinite number of usable axes.
 
Example: If the origin of a phys_hinge were to be dragged directly above the entity itself, the hinge axis would be a vertical line. If dragged to the side of the entity, the axis would be horizontal in whichever direction the origin were placed.


An entity can be set to rotate around a fixed point in the world by entering its name either in the ''attach1'' (''Entity 1'') or the ''attach2'' (''Entity 2'') keyvalue. It can also be set to rotate around another entity by specifying ''both'' of these fields, potentially creating a hinge that can be moved around in the world.
An entity can be set to rotate around a fixed point in the world by entering its name either in the ''attach1'' (''Entity 1'') or the ''attach2'' (''Entity 2'') keyvalue. It can also be set to rotate around another entity by specifying ''both'' of these fields, potentially creating a hinge that can be moved around in the world.


To set how tight these two objects will hinge together, you can apparently alter the ''Mass Scale'' keyvalue of the constrained entities. (If you come up with a better idea on how to do this, please add it.)
To set how tight these two objects will hinge together, you can apparently alter the ''Mass Scale'' keyvalue of the constrained entities. (If you come up with a better idea on how to do this, please add it.)
==Keyvalues==
==Keyvalues==



Revision as of 08:18, 3 August 2007

Template:Wrongtitle

Entity Description

A physically simulated hinge, rotating entities around an axis. The axis is the line between the actual point entity and its origin as set in hammer, although it can also be set using the helper. This allows for, essentially, an infinite number of usable axes.

Example: If the origin of a phys_hinge were to be dragged directly above the entity itself, the hinge axis would be a vertical line. If dragged to the side of the entity, the axis would be horizontal in whichever direction the origin were placed.

An entity can be set to rotate around a fixed point in the world by entering its name either in the attach1 (Entity 1) or the attach2 (Entity 2) keyvalue. It can also be set to rotate around another entity by specifying both of these fields, potentially creating a hinge that can be moved around in the world.

To set how tight these two objects will hinge together, you can apparently alter the Mass Scale keyvalue of the constrained entities. (If you come up with a better idea on how to do this, please add it.)

Keyvalues

<float> Resistance/friction in the hinge
  • hingeaxis
<vecline>
  • SystemLoadScale
<float> Scale of the load connected to this hinge (1=just the objects directly connected)

Flags

Inputs

Set angular velocity around the hinge (motor)

Outputs