Func door rotating

From Valve Developer Community
Revision as of 17:47, 2 June 2008 by Brandished (talk | contribs) (some notes)
Jump to navigation Jump to search

Template:Wrongtitle Template:Base brush

Entity description

A brush entity for use as a rotating player-usable door. (For a sliding door, use func_door instead.) Normally Source games will use prop_door_rotating entities using special door models. This entity is only suitable if no such model exists for the door. Either its brush can be shaped into a door with a door texture, or, if a non-door model exists, a prop_dynamic using the model can be parented to a little nodrawed func_door_rotating at the rotating origin. Template:Brushmodel

To make a pair of doors open and close together, give them the same targetname.

Notes

Axes

The a func_door_rotating entity can only rotate around either the x, y or z axis and no combination of the two other then 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.

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 that can be dragged to a new location.

Example

Here in the 3d view we have a brush we selected, 1, that is tied to the func_door_rotating entity. We want it to rotate downward to position 2 to bridge the gap between the two ledges. To do this we need to alter the door's origin to sit at point 3. Example.jpg
First you want to find the axis we want the brush to rotate on, a good way to do this is to look through the grid views and find the one which shows exactly where we want to place the origin. Once found, drag the cursor to the upper left hand side of the view port to reveal which view it is 1. This view only show two of the three axis, the missing one is the one we want, which in this case would be the Y axis. Go to the flag section of the door's object properties, and check the Y Axis box. The other thing to keep in mind is by default, a func_door_rotating moves clockwise around the point of rotation in the 2D view, we want it to move the other way, so we also need to check the Revers Dir box as well in the flags tab of the object properties. Now move the cursor over the door's origin, 2. Example.jpg
We want to rotate around the bottom right corner or the door, A, so we need to drag it the origin there. When the mouse is over the origin it should change into a plus sign (B) meaning it is ready to be moved, click on it and drag in down to point A, you should notice a red doted line that follows it as you move it. Once the origin is in point A we're done setting the origin. Example.jpg


Keyvalues

<integer> The amount, in degrees, that the door should rotate when it's opened.
  • solidbsp
<boolean> If set, use VPhysics, otherwise use BSP.

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

Outputs