![]() |
Box Checks
1 Attachment(s)
Is there any way to check if a number that is between a set of two numbers is inside of a point between two numbers? Mostly for checking if any point of a player's body is inside of an area, similar to findareanpcs().
I think my picture will explain it better than i could in words. Note that there's no definite location of where the number(s) could be (as it could be hit in various spaces), so I can't check for only one point/general location. |
1 Attachment(s)
Just use a point to tell if it's inside. Alternatively, use radiuses.
|
Quote:
Quote:
|
You want to do this..?
PHP Code:
1. Check the center 2. Check the corners |
Quote:
More along the lines of this (though not possible) PHP Code:
|
Then use a for loop?
PHP Code:
|
Quote:
|
Check out the separating axis theorem.
|
Quote:
Checked if either of the image's edges are inside another one, so there are 4 checks each for horizontal and vertical. |
Forgot to post this, but if anyone is wondering what I've done for this, I've posted it below.
PHP Code:
|
All times are GMT +2. The time now is 01:01 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.