Page 1 of 1

How can I move the selection box of this entity?

Posted: Thu Apr 21, 2016 8:57 am
by YoloJoe
Image

I want to move the selection box to fit over my machine, whatever I do with the

Code: Select all

selection_box = {{-4.2, -0.6}, {2, 2.35}},
values the box just seem to get bigger or smaller, how can I simply move it a bit to the right?

Re: How can I move the selection box of this entity?

Posted: Thu Apr 21, 2016 10:32 am
by MrDoomah
selection_box = {{-4.2, -0.6}, {2, 2.35}},
The selection box is an area around the entity position. The entity sits at position {0,0} and the selection box is then:

Code: Select all

    selection_box = {{Left border, Top border}, {Right border, Bottom border}},
and translates to

Code: Select all

    selection_box = {{ - Width / 2, - Height / 2 }, { Width / 2, Height / 2 }},
To move this, you just change the selection box with an offset:

Code: Select all

    selection_box = {{ (- Width / 2) + offset, - Height / 2 }, { (Width / 2) + offset, Height / 2 }},
Please note that the left and top border must be smaller or equal to 0 and the right and bottom border must be greater or equal to 0.

Re: How can I move the selection box of this entity?

Posted: Thu Apr 21, 2016 12:26 pm
by Arch666Angel
To be honest, it might be easier to just shift your animation/picture to the left side.