Page 1 of 1
Static Models at an arbitrary up-down angle
Posted: Mon Feb 25, 2008 5:48 pm
by Killerdude
I am tring to use the static model "static/lamp/lightbulb-covered-nowire" as a spot light that points from the ground up on the face of a building. If I try to change the angle in the entity dialog box it just rotates it about the Z axis and basically does nothing. If I change it to up or down it points in a horizontal plane, which is close and may have to be good enough. However, it would be nice to look right. Is there a way to set an arbitrary up-down angle on a static model or does the shader need to be edited?
Posted: Mon Feb 25, 2008 5:56 pm
by neillomax
Are you using the neg sign ( - ) ? Sometimes you need to.
Also, /tutorials.php?category=All
look for light beams.
Posted: Mon Feb 25, 2008 6:26 pm
by Killerdude
It is not the light beam that looks funny, its the static model of the lamp. I'll post a picture tonight when I get home

Posted: Mon Feb 25, 2008 6:33 pm
by PKM
dirty way of doing this...put a light entity in the map at a height that would big within the spotlight's light, highlight both your lightbulb entity and the lightbulb and connect, deselect , highlight the light entity and delete . the lightbulb entity should still be at the new angle .
either/or just jot down the angle value your lightbulb entity has when it's connected to the light entity, delete the light entity, highlight the lightbulb, pull up the entity window and punch in the new value for angle(s?) .
Posted: Mon Feb 25, 2008 7:37 pm
by Rookie One.pl
Use the angles (note the plural form) entity key. The value is the 3 angles of a
Tait-Bryan rotation (do read the article, it's not as hard to understand as it seems

), pitch, yaw and roll respectively, separated with spaces.
Posted: Mon Feb 25, 2008 10:39 pm
by PKM
just bookmarked that, thanks rook .
Posted: Mon Feb 25, 2008 11:28 pm
by Killerdude
Thanks for the help all. I would like to re-iterate "use the plural form". It worked much better with the "S".
From g_allclasses:
Code: Select all
angle( Float newAngle )
set the angles of the entity using just one value.
Sets the yaw of the entity or an up and down
direction if newAngle is [0-359] or -1 or -2
angles( Vector newAngles<0.00...360.00><0.00...360.00><0.00...360.00> )
set the angles of the entity to newAngles.