Jump to content

What is Itemtype.txt Logic bounding box


Recommended Posts

Hey again,

I've been messing around with changing item appearances and I was just wondering what the logic bounding box paramaters in itemtype.txt do, if anybody knows. I'm assuming its something to do with the items position on the model, or its position that the game recognises for certain graphics effects, but I don't know for sure.

The code I'm referring to is this:

    -- logic bounding box
  logicBox = {
    minx=-9.623, miny=-8.72, minz=0.12, 
    maxx=12.52, maxy=13.248, maxz=72.018, 
    },

just an example which belongs to the very first entry in itemtype.txt.

Link to comment

These parameters define the "size" of the item, irrespective of the model size.

Increase the numbers on a creature, and you will find that the game treats the creature as being larger. That is, you can hit it from further away (and it can hit you) and you "collide" with the creature sooner than the model size might suggest.

Decrease the numbers to get the opposite effect.  If the values are low enough you will be able to pass through parts of the creature model because the game is not yet detecting a collision.

Hope that makes sense.  It's similar to what other games would call a hitbox.

Link to comment

Ah I see, yes that does make sense. Thank you Flix :)

The implications seem clear for most objects then, but what exactly does it do for player equipped gear? Since it is defined for gear that player characters can equip, does it just determine the 'hitbox' for the player model based on the items equipped? (where not having any items equipped would use the defaults for that slot)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up