Ok here goes
Setsize refers to the bounding boxes of entities. The size in which they take mass or are solid.
A model can be scaled up heaps so it looks HUGE , but its bounding box ( or setsize) will stay the same. So you could be walking through the brush texture even if the entity is solid. Or vise-versa you could scale a model down but not walk close to it because the bounding boxes are still in place.
To view their bounding boxes , start a server from your mohaa.exe , with cheats enabled and the following settings
sv_showbboxes 8
There are many other settings for sv_showbboxes, but i used 8
so your commandline might look something like this
+set ui_console 1 +set cheats 1 +set thereisnomonkey 1 +set cl_playintro 0 + g_gametype 1 + set developer 1 +map dm/saturday_night_fever_3 +set sv_showbboxes 8
Some models come with some outrageous bounding boxes, take your example above with the cardtable
This is what the default bounding boxes look like
See how the bounding box extends way out past the origin and the tables brush texture.
How we fix this is by changing the entity's setsize
The setsize command is in two sections , both refer to either side of the 'origin' of the entity you are spawning. If you take a look at the above picture, the small blueish box in the center of the table down low is the 'origin'.
local.static setsize ( 0 0 0 ) ( 0 0 0 )
So each one represents each side of the origin , in xyz format , in general the first vectors is where you go negative from the origin ,
ie ( -10 -10 -10 )
The second set of vectors you would go positive
ie ( 10 10 10 )
This would make a square around the origin or 20x20 , ie 10 one way + 10 the other way = 20.
I have already done the table for you to see how it would look once your done.
local.static setsize ( -3 -42.5 0 ) ( 50 37.5 50 )
Looks like
You picked a good example on a model that its origin isnt in the dead center of the brush texture. From this perspective , its right at the back and a little to the right of dead center.
So the X values are -3 and 50
from this angle it means the box goes forward 3 squares and back towards us for 50
Y values are -42.5 and 37.5
from this angle it means the box goes left 42.5 and right for 37.5
Z values are 0 and 50 , meaning origin is on the floor , no need to go lower, and the tables height is around 50
Things to Note is this
WILL have to BE changed if you rotate or change the models angles, so you get it where you want first
THEN adjust its setsize.
Each model is different, some might have near perfect bounding boxes while others like the one above are completely out of it.
Here are the other settings for sv_showbboxes
Code:
sv_showbboxes [0,28] - show bounding boxes of entities.
1 - shows all solid entities with their standard mins and maxs
2 - shows all solid entities with their absmins and absmaxs
3 - shows all entities that are solid and non solid but are not tagged as RF_DONTDRAW
4 - shows all entities, even those tagged as RF_DONTDRAW
7 - shows all entities with their TIKI bounding boxes
8 – shows normal bounding boxes as well as a small bounding box around the origin
9 – 28 – show bounding boxes of hit locations on models