obj model rotation

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
K.I.A.
Corporal
Posts: 27
Joined: Thu Feb 26, 2004 11:19 pm

obj model rotation

Post 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? :(
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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.
K.I.A.
Corporal
Posts: 27
Joined: Thu Feb 26, 2004 11:19 pm

Post 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?
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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 ?!
K.I.A.
Corporal
Posts: 27
Joined: Thu Feb 26, 2004 11:19 pm

Post 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.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

angles

Post 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 )
Tom Trude,

Image
K.I.A.
Corporal
Posts: 27
Joined: Thu Feb 26, 2004 11:19 pm

Post 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.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

origin

Post 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.
Tom Trude,

Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

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
Image
K.I.A.
Corporal
Posts: 27
Joined: Thu Feb 26, 2004 11:19 pm

Post 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.
User avatar
n0013
Corporal
Posts: 27
Joined: Wed Oct 22, 2003 6:53 pm
Location: Canada

Post by n0013 »

mabey try a script_object that may also work...
Post Reply