Page 1 of 1
Collision Box Rotation[?]
Posted: Wed Apr 27, 2016 1:40 am
by AenAllAin
Is the collision box supposed to rotate with the image for mining drills? The in-game perspective is the same. The only thing that rotates is the object. So it should be occupying basically the same amount of space. So why does the collision box rotate as well?
Re: Collision Box Rotation[?]
Posted: Wed Apr 27, 2016 12:08 pm
by doc
Maybe the collision box should be square in the first place so it wouldn't matter if it rotated. For non-square entities, e.g. pipes or combinators, rotation of the collision box is important.
Re: Collision Box Rotation[?]
Posted: Wed May 18, 2016 7:46 pm
by AenAllAin
This makes me very sad. I can't post my drill mod because of this issue. I don't think the "everything must be a square, because Factorio hates rectangles" answer is a good one. Maybe, I didn't describe the problem well enough...
(a) I have a 3D model of a square drill. (b) When rendered from the game perspective it appears rectangular. (c) When the 3D model is rotated in 3D and re-rendered in game perspective it faces a different direction but is still a square in 3D and still appears to be a rectangle of the same dimensions from the game perspective. (d) Once all four sides/rotations have been rendered into game perspective, I properly attach them to a drill entity with four different directional animations. (e) I define the ONE collision box for the entity which is rectangular according to it's initial orientation. (f) In game, I place the initial oriented drill entity; it's collision box (as well as it's selection box) matches it's graphical orientation. (g) I rotate the drill ...it's f__ed up. The graphic looks correct, the selection box remains the same ...the rectangular collision box rotates and becomes oblong and looks nothing like the graphic.
What am I doing wrong?
Re: Collision Box Rotation[?]
Posted: Wed May 18, 2016 8:30 pm
by Rseding91
Factorio was not built with rotatable non-square building entities in mind and as such it probably just won't work correctly for what you're after.
Re: Collision Box Rotation[?]
Posted: Wed May 18, 2016 8:34 pm
by AenAllAin
Rseding91 wrote:Factorio was not built with rotatable non-square building entities in mind and as such it probably just won't work correctly for what you're after.
Aww ...so; it does have to be a square then? Ok; thanks for the answer.
Re: Collision Box Rotation[?]
Posted: Wed May 18, 2016 11:46 pm
by Arch666Angel
AenAllAin wrote:Rseding91 wrote:Factorio was not built with rotatable non-square building entities in mind and as such it probably just won't work correctly for what you're after.
Aww ...so; it does have to be a square then? Ok; thanks for the answer.
From experience: Don't try to make it work for anything other than a square, it will drive you mad. The only thing which can work as a non square is the steam engine type.
You can try to play with the view angle before rendering, or stretching the model so it matches the square, another "hack" is to make your model higher in the mid section so it will cover the parts that wouldn't be covered by it otherwise.
Re: Collision Box Rotation[?]
Posted: Tue Jun 21, 2016 6:15 am
by bSun0000
I faced the same problem.. even if this game looks isometric, this collision boxes totally ruins it.
I hope, some day, this behavior will be changed, so we can specify - may this box to be rotated or not. Or define different geometries for different angles, like sprites.
Re: Collision Box Rotation[?]
Posted: Tue Jun 21, 2016 6:24 am
by bSun0000
And collision box also affects on sprites.. oh god, why... this is too cruel!