func_door_rotating
func_door_rotating is a brush entity available in all Source games.
Entity description
It creates a rotating brush that can be "opened" by players or NPCs.


Notes
Axis
The func_door_rotating entity can only rotate around either the x, y or z axis and no combination of the two other than x and y. By default, the entity is set to rotate on the Z-axis and can be changed through altering the flags section of the object properties.

Rotation Direction: A func_door_rotating opens clockwise by default.
Setting the Origin
The point of rotation can be changed through the alteration of the entities origin. The origin sets which point on the plane of movement the object will rotate through, think of it as a hinge for a door. With the show helpers option enabled in Hammer, the origin will appear as a small white circle in the center of the entity that can be dragged to a new location.
Example
Keyvalues
- Distance
<int>
- Degrees the door should rotate. It will rotate away from the player
- Solid Type
<choices>
- How to calculate collisions. To do: What is best when?
Origin:
- Origin (X Y Z)
<origin>
- The position of this entity's center in the world. Rotating entities typically rotate around their origin.
Angles:
- Pitch Yaw Roll (Y Z X)
<angle>
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
BaseDoor:
- Linked Door (chainstodoor)
<string>
!FGD - Passes the door's
+use
inputs and touch events onto a different door, so it also is activated. - Block Filter Name (filtername)
<targetname>
- (For Half-Life: Source) Filter to use to determine entities that can block the door.
- Speed (speed)
<float>
- Speed that the door moves, in units (sliding door) or degrees (rotating door) per second.
- Start Sound (noise1)
<sound>
- Sound to play when the door starts moving (regardless of opening or closing).
- Stop Sound (noise2)
<sound>
- Sound to play when the door stops moving (regardless of opening or closing).
- Start Close Sound (startclosesound)
<sound>
- Sound to play when the door starts closing.
- Stop Close Sound (closesound)
<sound>
- Sound to play when the door stops closing.
- Delay Before Reset (wait)
<float>
- Time until the door returns to the closed position. A value of -1 means the door never auto-closes.
- Lip (lip)
<float>
- When the door opens, it will move its full length minus this many units. Negative values will make the door move that many more than its length.
- Blocking Damage (dmg)
<float>
- Amount of damage done to entities that block the movement of this door, per frame.

trigger_teleport
while using noclip
, they will not be damaged.- Force Closed (forceclosed)
<boolean>
- Makes the door close no matter what. Useful for doors that have to close even if the player tries to block them with objects.
- Ignore Debris (ignoredebris)
<boolean>
- Changes the door's collision group to
COLLISION_GROUP_INTERACTIVE
, which ignores debris objects. Not compatible with the Non-solid to Player spawnflag as it also sets a collision group. -
Health (health)<integer>
- Deprecated. Do not use.
-
Message If Triggered (message)<string>
- Deprecated. Do not use.
- Locked Sound (locked_sound)
<string>
- Sound played when the player tries to open the door, and fails because it's locked.
- Unlocked Sound (unlocked_sound)
<string>
- Sound played when door is unlocked.
- Spawn Position (spawnpos)
<choices>
- State the door should begin in.
- 0: Closed
- 1: Open
- Locked Sentence (locked_sentence)
<choices>
(Half-Life: Source) - Intercom voiceline for when the player tries to use the door, but it's locked.
- Unlocked Sentence (unlocked_sentence)
<choices>
(Half-Life: Source) - Intercom voiceline for when the door is unlocked.
- Loop Moving Sound? (loopmovesound)
<boolean>
- Makes the door's Start Sound loop until the door finishes moving.

Flags
- 1 : Starts Open - This door spawns open.
- 2 : Reverse Dir - This door opens in the opposite direction.
- 4 : Non-solid to Player - This door does not collide with the player or NPCs.
- 8 : Passable - This door does not collide with anything.
- 16 : One-way - This door only opens in one direction.
- 32 : Toggle - This door switches between open and closed on each input.
- 64 : X Axis - This door rotates on the X axis.
- 128: Y Axis - This door rotates on the Y axis.
- 256 : Use Opens - The +use key triggers this door.
- 512 : NPCs Can't - NPCs can't use this door.
- 1024 : Touch Opens - Collision with the door triggers it.
- 2048 : Starts locked - This door spawns locked to the player or NPCs (though an input can still trigger it).
- 4096 : Door Silent - This door makes no noise.
Inputs
Door:
-
Open
- Opens door.
-
Close
- Closes door.
-
Toggle
- Opens door if closed, closes door if opened.
-
Lock
- Prevent door from opening, but can still close.
-
Unlock
- Allow door to operate as normal.
-
SetSpeed
- float
Outputs
BaseDoor:
-
OnClose
- Fired when the door starts to close.
-
OnOpen
- Fired when the door starts to open.
-
OnFullyClosed
- Fired when the door finishes closing. Reversed if Start Open flag is set.
-
OnFullyOpen
- Fired when the door finishes opening. Reversed if Start Open flag is set.
-
OnBlockedClosing
- Fired when the door has been blocked from closing.
!activator
is whatever blocks the door. -
OnBlockedOpening
- Fired when the door has been blocked from opening.
!activator
is whatever blocks the door. -
OnUnblockedClosing
- Fired when the door is no longer blocked from closing.
-
OnUnblockedOpening
- Fired when the door is no longer blocked from opening.
-
OnLockedUse
- Fired when the player tries to open the door but fails because it is locked.
Targetname:
-
OnUser1
toOnUser4
- These Outputs each fire in response to the firing of the like-numbered
FireUser1
toFireUser4
Input; see User Inputs and Outputs. -
OnKilled
(Only in the Left 4 Dead series) - This Output fires when the entity is killed and removed from the game.
See also
- func_rotating
- prop_door_rotating
- func_door (slides instead of rotating)
- Door creation
- WiseDoor - example use and illustration of doors.