obj model rotation
Moderator: Moderators
obj model rotation
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? 
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?
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?
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.
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
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 )
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 )
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.
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
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.
- Axion
- Major General
- Posts: 683
- Joined: Mon Sep 29, 2003 5:14 am
- Location: Northern California
- Contact:
You can also try using the free rotation button on the toolbar and see if that works.
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

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.
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.
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.
