I have tested all the parameters and shown the region in games with two beacons (one set at the bottom left, the other at the center).
So far I've not been able to understand how it works... Each parameter seems to modify both size radius and position of the region, at the same time !
Here's the code I used for testing (in the game trigger initialization):
The first two parameters of 'Add a Positive rectangle' are the negative X size and the negative Y size of the region you want to place, and then the region is moved to the wanted location. But it's not working properly :p
On the other hand, Add a Positive circle is working wonderfully :S
Anyway if someone finds out what I did wrong, or how to properly use the function, well respond to this thread !
I believe the parameters for a rectangle are (Minimum X, Minimum Y, Maximum X, Maximum Y). So the rectangle contains everything where Minimum X ≤ X ≤ Maximum X and Minimum Y ≤ Y ≤ Maximum Y. So your rectangle (120, 120, 1250, 125) starts at the point (120, 120) and has a width of 1130 and a height of 5. Is that what you intended?
Firstly, I made a mistake correcting the copy-paste of my code, so it was 125 and not 1250 :p
Secondly you appear to be correct. I took a break, came back to it and added the Top-Right Bound which simplified the visualization.
I was so stuck on a point + size configuration that it didn't cross my mind the parameters could be the two bounding points of the rectangle :p
Thanks for the fresh input !
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ok, I can't figure out how this thing is working:
I have tested all the parameters and shown the region in games with two beacons (one set at the bottom left, the other at the center). So far I've not been able to understand how it works... Each parameter seems to modify both size radius and position of the region, at the same time !
Here's the code I used for testing (in the game trigger initialization):
I thought I had found work around to place a rectangular region correctly:
The first two parameters of 'Add a Positive rectangle' are the negative X size and the negative Y size of the region you want to place, and then the region is moved to the wanted location. But it's not working properly :p
On the other hand, Add a Positive circle is working wonderfully :S
Anyway if someone finds out what I did wrong, or how to properly use the function, well respond to this thread !
I believe the parameters for a rectangle are (Minimum X, Minimum Y, Maximum X, Maximum Y). So the rectangle contains everything where Minimum X ≤ X ≤ Maximum X and Minimum Y ≤ Y ≤ Maximum Y. So your rectangle (120, 120, 1250, 125) starts at the point (120, 120) and has a width of 1130 and a height of 5. Is that what you intended?
@Sublimity: Go
Firstly, I made a mistake correcting the copy-paste of my code, so it was 125 and not 1250 :p
Secondly you appear to be correct. I took a break, came back to it and added the Top-Right Bound which simplified the visualization. I was so stuck on a point + size configuration that it didn't cross my mind the parameters could be the two bounding points of the rectangle :p
Thanks for the fresh input !