I've been trying to make my own variation of car, but I stumbled upon little issue.
I'm unable to define proper collision_box, since there is no reference on what those values actually mean:
collision_box = {{-1, -1}, {0, 0}},
it some kind of ratio - ratio of what? (definetly not of image size)
it isn't x,y,w,h or x1,y1,x2,y2, what is it then?
collision_box - what does it actually mean?
- SkaceKachna
- Burner Inserter
- Posts: 11
- Joined: Fri Aug 01, 2014 2:38 pm
- Contact:
-
- Filter Inserter
- Posts: 559
- Joined: Mon Mar 04, 2013 9:23 am
- Contact:
Re: collision_box - what does it actually mean?
I'm not sure exactly but I would say those represent the two 2D points (corners) which define the colision boy. I asume these are probably UpperLeft and BottomRight point. And as you know 2D point positions are always expressed with two values X and Y position.
Now these positions are relative to object position. So -1, -1 probably means some position left and downwards of center position of object
Now these positions are relative to object position. So -1, -1 probably means some position left and downwards of center position of object
- SkaceKachna
- Burner Inserter
- Posts: 11
- Joined: Fri Aug 01, 2014 2:38 pm
- Contact:
Re: collision_box - what does it actually mean?
Yea, looks like this is the case, the problem I had was different, I was looking at object rotated 90 to north, meaning the collision box was also rotated, but it was rotated against wrong center point, which caused very weird results.
I'm still interested what those ratios mean, but I can live without that
I'm still interested what those ratios mean, but I can live without that

Re: collision_box - what does it actually mean?
They're corner points: {{topLeftX, TopLeftY}, {BottomRightX, BottomRightY}} where each "1" is 32 pixels (one tile) in-game. You can turn on the grid view in-game to see how big one tile is.
If you want to get ahold of me I'm almost always on Discord.
- SkaceKachna
- Burner Inserter
- Posts: 11
- Joined: Fri Aug 01, 2014 2:38 pm
- Contact:
Re: collision_box - what does it actually mean?
Thank you for your answers, that exactly what I wanted to kno 
