Details of origin, region, collison

Is there a doc or post somewhere that describes the relation between “model_origin”, “region_origin”, and “min”/“max” with “region_collision_shape”? Also, what is the difference between model_origin in “components” and the one that’s inside “mob”?

I’ve looked around and found some posts about correcting faulty “region_collision_shape”, most recently for the large crates, but I don’t follow exactly what they are doing (thought I did at first, but apparently not – see below).

I have a good handle on “model_origin” moving a placeable object around with the in-game grid relative to the qb grid, but when I try adding the collision info, I end up creating an item that cannot be placed near a wall in a particular orientation. Maybe I’m just confused about whether the collision info is relative to the model origin or the one in the qb file.

2 Likes

I don’t understand it either, if it makes you feel any better. I spend a LOT of time entering values, and loading up the game to press F11, and then start over because my brain just cant comprehend it.

Only value I ever get right first time is “Y” -.-

Model Origin is to offset the centre of the model. Region Origin is to offset the regions. Collision shape draws an invisible box around your object, so Hearthlings don’t run though it, and Destination region draws a shape from where Hearthlings can interact with said object. The min max values define the shape size.

My best advice is to enable debug keys, and hit F11 to see an in game representation of your collision shapes and destination regions

Redundant code I suspect.

Hope this helps.

4 Likes

Thanks! That was really helpful. I had seen screenshots of that view, but I wasn’t sure how to switch that on.

1 Like

I was going to reply to this topic, then I realised it’s actually a hard thing to explain and probably deserves a full tutorial/reference. So I made a new topic here so people can refer to it as needed.

It’s probably hard to understand in a pure text form, so I plan on adding some pictures when I have time (I may not be able to get them all done for a couple days due to other commitments).

2 Likes

Thank you, for that tutorial! I’ll try again tonight to see if this solves my problem. Specifically the note about region origin being on a corner. I think that is why even when I tweaked it to look right, I still couldn’1 get my object up snug against a wall.

2 Likes