Tutorials

quake2 - func_rotating


Rotating brushes were first showcased in hipnotic's quake mission pack and they were extremely difficult to get to work. They required a ton of work to get them to turn out right. Well quake2 fixed all this. Rotating brushes are very easy to use now.

The first step in making your rotating brush is to make the actually brushes that will be rotating. There are basically 2 parts to a rotating brush. First part is the object that will rotate and the second is the object that part 1 will rotate around. We are going to call this the origin brush. Think of it as the part that won't be moving. For example...picture a fan with 2 blades that are spinning around. The middle part that the blades are connected to would be the origin brush.

pic of rotation

After creating the brushes that will make up your func_rotating then select all the parts of the object and turn it into a func_rotating. Now select the part of the object that will be the non moving center(origin) of the object and change the surface property of it to an origin brush.

By default the object will rotate on the z axis. To change this just set the spawnflag to either x_axis or y_axis. Z axis rotation is parallel to the floor. X axis rotation will be parallel to the wall at 90 or 273 degrees. Y axis rotation is parallel to the wall at 0 and 180 degrees.

There are a few more spawnflags that you can set for a func_rotating. They are start_on, reverse, touch_pain, and stop. Start_on will make the rotating object start rotating when the game begins. Reverse makes the brush rotate in the opposite direction. By default the rotating object will only cause you pain if you are stuck between the object and a wall or something. If touch_pain is turned on then it will cause damage to any entity it touches. Stop makes the rotating object stop completely when the an entity such as the player blocks its way. It will still take your health away though. By default a func_rotating will push you around with it. With stop set it will not push you just give damage.

You can also specify the speed of the object and damage it will give out. Just set the key value pairs speed and dmg to change these. So if you made a fan and you wanted it to kill the player very quickly when touched then you would set dmg to something like 200. dmg=100. Likewise with speed.

On the [example .map] there are examples of all these different options and various spawnflags as well as an example of a triggered func_rotating. Step on a button and the object will start rotating. Step on it again and it will stop. Pretty cool. Thats about all there is to func_rotating. If you have any questions then post them in the discussion section.

Return to Tutorials Page...







Copyright Crap