Adjusting origins

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
Post Reply
Handshakes
Posts: 11
Joined: Sun May 30, 2010 6:53 pm
Location: Detroit, MI

Adjusting origins

Post by Handshakes »

I'm trying to get my custom baddies to stop putting their feet through the floor ;).

Is there an easy way to adjust the origin of a model, preferably from the qc file? I tried changing $origin but the changes do nothing. I could always go back into blender and move the model by hand, but that is sort of a pain and not particularly accurate.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

An interesting quirk of the bsp hulls is that collisions are based upon the bottom-left corner of your entity's bbox.
So you can shift the model up and down by changing the mins_z of the bbox. A more negative mins_z will move the model upwards, or something like that.

Note that this will not change the overall height of your monster with regard to walking through doorways. But it will change their size with regard to projectiles. As a result, you should attempt to ensure that your maxs_z is mins_z+hullheight, and that your model is just shorter than the hull height that you wish to use. Or in other words, if you subtract from the mins_z, subtract from the maxs_z too.

$origin is not used by QC code. It is only used by tools that parse QC code to decide how to build an mdl file from its constituant parts ($frame stuff acts as an enum, otherwise all $ stuff is ignored for qc).
Handshakes
Posts: 11
Joined: Sun May 30, 2010 6:53 pm
Location: Detroit, MI

Post by Handshakes »

That did the trick! Thanks a million! I never would have guessed that.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

... it works?... wow.
Post Reply