Page 1 of 1
obj model rotation
Posted: Thu Feb 26, 2004 11:28 pm
by K.I.A.
I am making and obj map and am having a problem with the obj model. I am using a king tiger model and I have rotated by pressing 'n' and using the 'angle' key and a numerical value. everything looks right in radiant, but when i compile, the model is turned back to the defualt angle. Does anyone know how to get the model to stay at the angle I want it? Why won't it just work?

Posted: Fri Feb 27, 2004 1:27 am
by wacko
u might have to use the static/vehicles/german/king_tiger. the vehicles outside the static folder are (I believe) rather to be driven and probably their angles are set just by the script.
Posted: Fri Feb 27, 2004 5:19 am
by K.I.A.
I am using the model 'static/vehicle_ktigertank.tik', so the static thing shouldn't be the problem. I have also rotated that the script_origin box that the model is coming from using 'r' key, and no luck.
If I am unable to get this model to rotate in radiant, can you tell me how (if its possible) to rotate it in my script?
Also, how do I find out what the .tik files for models are called? I had a heck of a time finding this model. For example if I wanted to use an opel truck, how would i find the name of an appropriate .tik file for a opel truck?
Posted: Fri Feb 27, 2004 9:00 am
by wacko
when I try placing a Static/Vehicle/German/Tank-Kingtiger and give it an anglr of 135, this is exactly what I get ingame... Using 'r' won't work for entities and will rather cause trouble (especially with coronas). Maybe redo it ?!
Posted: Fri Feb 27, 2004 10:00 am
by K.I.A.
I don't think I was specific enough on what I am trying to do, so let me clarify. I am making an obj map with a king tiger as the target to be bombed. I have created a 'script_origin' with the key 'model' and value 'static/vehicle_ktigertank.tik' (There are other keys and values of course, but not important to this issue). This creates a king tiger model aound my 'script_origin'. When I test my map, the obj works perfectly, except the tank is not pointing where I want it to. In my 'script_origin' I have added the key 'angle' and the value '225'. This points the tank in the right direction in radiant, but when I compile the tank is pointing at angle 0 (same as when no 'angle' key is present in 'script_origin'). To create this obj, I have slightly modified the procedure given in the following tutorial by nemesis:
http://users.1st.net/kimberly/Tutorial/obj.htm
All my other (non-obj) models work propery and point in the direction I want them to. I had the same problem when I tried rotating the Flak88 cannon as given in the tutorial. Possible solutions to my problem are, a way to keep my model rotated thru the compile, a way to angle my model in my script, or possibly way of doing this type of objective where this problem doesn't come up. I'm sure someone out there has made an obj map with a vehicle or weapon objective that doesn't point at angle 0.
All suggestions are very welcome.
angles
Posted: Fri Feb 27, 2004 11:04 am
by tltrude
If setting the angle does not work, try "angles".
Key: angles
Value: 0 90 0
The three numbers are pitch, yaw, and roll. Using just angle, you are only setting the yaw. If you are spawning the tank then set the angles for the tank--not the origin.
$my_tank.angles ( 0 90 0 )
Posted: Fri Feb 27, 2004 11:30 am
by K.I.A.
Under what entity do i set 'angles'? The tank model is part of my 'script_origin' entity, not an entity itself. So if i'm not setting the angle of the origin, do I still enter the key you gave me in the origin?
Also, in the key you gave me '$my_tank.angles ( 0 90 0 )' is the '$my_tank' part put in as given, or do I change that to a name that I used on my map?
Sorry, I'm pretty new at this stuff, so I need specific intructions.
origin
Posted: Fri Feb 27, 2004 11:43 am
by tltrude
Why are you using a script_origin? Maybe you should try a script_model. The only reason for using a script_origin would be so you can spawn a model, in your script, at that point. But if this is an exploder tank, a script_model is the way to go. And, "angle" should work well with a script_model too.
Posted: Fri Feb 27, 2004 4:07 pm
by Axion
You can also try using the free rotation button on the toolbar and see if that works.
Posted: Sat Feb 28, 2004 6:18 am
by K.I.A.
Ok, good news first... I changed the script_origin to a script_model and now the tank stays rotated after the compile.
Now, not so good news. There is a large rectagular shadow around the tank (something to do with a bounding box im sure). When I walk onto the shadow, the tank is no longer visible.

Any ideas on how to fix this?
I haven't got any1 on yet to let me test if the obj stuff still works, but I think I will leave that 1 for later.
Thanks for the help so far.
Posted: Sun Feb 29, 2004 1:22 pm
by n0013
mabey try a script_object that may also work...