Sambo wrote:I have a few questions about the Colliders library:
1) Is there a quick way to tell which side of a player's hitbox is colliding with another object? I can't use the "collision status" addresses because this only works with blocks, and it's not able to be used to test for collision with a certain object. If not, I can just create a collision sensor on each side of the hitbox, but that will take a lot of work because players change size, and characters may have different hitboxes and hot spots.
2) How big are each character's hitboxes and where are their hot spots? (If the answer to 1 is no)
3) What position do objects have to be in for it to count as a collision? Is it if at least 1 pixel overlaps, or do they only have to be right next to each other (without pixels between)?
Currently no, unless you use the raycast system, which isn't really the same thing. You can do a basic coordinate check, though, which might get the results you need, depending on the use case.
You can get the size of the hitbox directly from the character code, but Colliders also has a "getAABB" function, which gets the Axis-Aligned Bounding Box (Box collider) that fits that object. By calling that on the player, you'll get the standard player hitbox, and you can then use that as a guide for other hitboxes.
The collisions aren't based on "pixels", they're calculated mathematically. If every collider object's position is an integer, then it will be pixel-based, but that's very unlikely to happen, especially if you're using the player, so I wouldn't try to consider that as something you can rely on.