Snarkpit Articles

Rotating Door

How to make a simple door that swings open
Here I will explain how to make a nifty rotating door for HL2 or any of its mods. Also check out our func_door_rotating tutorial for details on more advanced doors.

First we will make a court yard divided by a wall. So, how will our player get from one side to the other? Through a door!

Article image


Above is the court yard with a dividing wall, this is where we will place our door.

Article image


Create a doorway- perhaps with the carve tool- and note that I am using the dev_measuredoor01 texture to help get the dimensions right (they are printed right there on the texture!)

Article image


After we have the door we have to make the frame. This is easy because the frame is part of the door texture. All we have to do is cut along the white lines just like you see above. Be sure to change your grid size ( "[" and "]" keys) so you dont cut too much!

Article image


We now can make this simple brush into a rotating door! Simply press the toEntity button (or press ctrl+T) and use the drop down menu under to find func_door_rotating.

Ok the hard part is over, you can leave most of the values on default. But we don't want just some crappy door, we want something people will believe is a door! First lets add some sounds.

(NOTE: sound is great in CS:S because it can alert the enemy and make the player think twice about using it... But don't over use sound, too many doors with the same sound will drive people mad)

speed 150
-in multi-player faster is better so people don't get stuck on the door
Start Sound Doors.Move3
Stop Sound Doors.FullClose3
-there are many sounds to choose from, in the sound menu filter "door"
Delay Before Reset (-1 stay) 4
-4 is the default, the higher the number the longer the door stays open before it closes its self. you can set -1 so the door stays open.
Distance 110
-this is how far in degrees the door will swing open.

Lets take a look at the Flags tab now.

(NOTE: be sure to press the Apply button, this sets all the options to the door you just made. If you don't press apply you wont see any flags!)

Article image


Most of these options speak for themselves. So I wont go over all of them.

X Axis & Y axis These will change the way the door rotates (don't check these, they are used when you make a door that swings up and down)
Use Open If checked the player will have to press +use (the E key in game) to open the door
Touch Opens This is the default, the door will open if the player bumps into it.

Now to complete the project! Press Apply and exit the properties box. resize the door like in the picture below.

Article image


That's a better size for a door.

Because this is a rotating door we need to tell the game where the door will rotate. If you used to map for HL1 you will remember the Origin Brush, but now we have no need for that! All entities now have an origin built in, see the circle in the middle of the door?

That is the origin, imagine that a vertical line travels through that circle. That line is the point where the door will rotate around. All we have to do is drag that circle to the point where the door's hinges would be.

Article image


Just like that.

Congratulations! you've made your first rotating door! Now just slap a texture on it and have fun.

Article image

Discussion

Posted by G4MER on Wed May 4th 2005 at 6:10am

Very nice, I tried it as you wrote it to see if it made any sense, and it was easy to follow. One thing you may add in there is the grid size. Make sure to tell people to adjust there grid size when making those cuts. If they dont they will never get the cuts right. Over all a very good TUT.
Posted by ellwood on Thu Feb 24th 2005 at 6:31pm

Very helpful for me, im just learning all the basics, this tutorial worked great!
Posted by greensinge on Mon Feb 21st 2005 at 11:29pm

Great tutorial. Helped me out a lot. Thanks for putting it out!
Posted by iceman on Thu Jan 27th 2005 at 6:20am

Great basic rotating door tutorial but is there any way to make a garage like door without having to do with other phys stuff?
Posted by ChiLLiN_the_MoSt_ on Thu Jan 13th 2005 at 9:48pm

Beautiful toot, ty. I am really very stupid and cannot figure out how to seperate the frame from the door. "cut along the white lines" i am totally lost here. please help.

-chillin-
Posted by habboi on Fri Dec 31st 2004 at 4:55pm

;) well done deserves 10/10 as all tuts are good :D wheres this 1/10 then?
Posted by Andrei on Thu Dec 30th 2004 at 9:27pm

I can make doors like this for centuries. However, i don't know how to make them using hammer. Useful!
Posted by Forceflow on Thu Dec 30th 2004 at 9:22pm

Good tut, helped me out.
Posted by WDUK on Wed Dec 22nd 2004 at 12:51pm

I would like to say "Well Done!"

This is a brilliant introduction to rotating doors for newbies and a reference for experienced alike.

I have learnt now how not to use an origin brush!
Posted by WDUK on Tue Dec 21st 2004 at 11:00pm

Filter "measure" (w/o quotes), without any keywords, then a lot of measure textures will appear, although they don't appear in the "Dev" keyword section.