Call of Duty 5: Dynamic Entities and Constraints

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
 This tutorial assumes that you are already familiar with Radiant, Triggers and Entities

Dyn_pointconstraint for Dynamic Entities

Dynamic point constraints can now be placed in Radiant in the ‘dyn’ right click drop down list. What they will do is allow a physics object to dangle and swing off of a predetermined point in the world (aka the dynamic point constraint).

This is not limited to models; if you wish to use a brush you can do so by cloning the brush and texturing the clone with a physics clip, and then, with both objects selected and at the same origin, making the objects a dynamic brushmodel and assigning a physics preset to both as if they were one dynamic entity. Without the physics clip, the brush will land funny if it is placed in the map at any rotated angle; the physics clip corrects this.

Just drop the dyn_pointconstraint and then link it to the dynamic entity that you want. The position of the dyn_pointconstraint represents the location it will be attached to the world.

You can see each respective dynamic entity’s targetname and the name of the entity it is targeting in the entity window when you have one selected.

Multiple Dynamic Entities

Additionally, the dynamic pointconstraint can be attached to two dynamic entities linking them together. Chains of dynamic entities can be formed.

To attach the dyn_pointconstraint to another dyn_entity ‘target2’ should be used. There is no hotkey for target2 so you will have to create the key/value pairs manually.

Radiant has been changed so that it will at least draw a link line to target2 in addition to target.

Health and Dynamic Pointconstraints

If health is specified on the dyn_constraint if the dyn_entity that it is linked to takes that much damage the constraint will go away. The object will then remain in physics but no longer be bound by the properties of the given point constraint.

Multiple point constraints

You can also attach 2 dynamic point constraints to one dynamic entity. What this does is allows the dynamic entity to swing from 2 different axis points, limiting its range of mobility as it swings. This can work similar to a hinge.


You can add health to both point constraints in this instance, and in doing so you must also add health to the associated dynamic entity as well.

Hinge Constraints

Hinge Constraints can be used to set a single axis on an object. This will allow you to create realistic moving doors and shutters on objects. After you drop in your dynamic entity, select dyn -> hingeconstraint. You’ll want to place your hinge constraint at a point central to your dynamic object (beside the object, and vertically at its center).

You must then set the min_angle and max_angle (using the entity window). The difference between the two angles cannot be greater than 180 degrees. To make it easy, you can set the min and max angles to negative and positive integers of the same absolute value (i.e. -45, 45 respectively). In the editor, you will get a visual representation of your min and max angles set by two lines protruding from the hingeconstraint.

If the object collides with another object in the world, it will react accordingly despite any additional room it has in its assigned arc (which basically keeps it looking realistic).


Distance Constraints

Distance Constraints work like regular point constraints except that they allow for an object to move within a certain predetermined distance in addition to swinging on the axis of a standard point constraint. It could be used to make something fall off of a ledge while attached to the ledge by a rope or chain, and then it would swing as if dangling.

After you add your dynamic entity, you can add your distance constraint by selecting dyn -> distance constraint.

You must then set the distance you wish the object to be able to fall (like a radius) from the distance constraint (in units).


Sources: Treyarch's Wiki