Log On
     
 





Tutorial: Yaw/Pitch/Roll
Page 3

Read the debugsun tutorial previous.

This section shows an example of a map object, a func_rotating before addition into a map. 

Note: Doors, pendulums will work with vanilla quake3. Some ents will not work with stock q3, only in WFA (and any other mod who wished to copy and paste code).

Below  are taken directly from radiant. N/S is Y, E/W is X.

Also remember what the pitch, yaw, roll are in relation to a mapobject.

Now we are going to be moving the X axis, re-orienting it so it will point towards the sun, and then rotating it along that axis. Using the same method, we negate the pitch we originally acquired, giving the entity a pitch of -78, a yaw of 65, and a roll of 0. Then selecting the spawnflag to rotate along the X axis, it's compiled and thus looks like this, pointing directly at the q3map_sun angles...

First, a picture of the brush before it's turned into a true brushmodel. This is just a func group. The flare i just left in there for effect, there's another one in which we wish to point towards. Keep in mind that the blue line is along the X axis, and what we wish to finally rotate it on.

Now, we need to adjust the angles so it will point to the sun. So we turn it first into a func_pendulmn and apply the angles (pitch 65, yaw 78, roll 45)

This will better help understand what was rotated. The lines with the curves are where they originally were. 

The final compile, after ungrouping/regrouping it into a func_rotating and selecting the X AXIS spawnflag.

Now lets try to understand it with a func_pendulum that originally had the long poll facing upright, instead of to the right as with the other example. We give it a pitch of 25 (-65 + 90) and a yaw of 78, and we have a brush that is perfectly aligned with the flare. To make it spin while always facing the sun, you would select the Y axis spawnflag.

In this manner you can apply almost any brushmodel in WFA (and even clone them using bmodel clones) to create perfectly engine-rendered surfaces and angles and apply movement to them. This allows you to reorient any brush model to travel along any of the 3 axis of movement, even doors.