I am working on some elements of a platform game and having a slight issue regarding ground detection.
I have a rectangle object, wider than high. When its angle is 0, it is easy to find the offset to check bellow for a ground/platform collision. But, if I rotate the body 90 degrees, the offset is much lower causing problems for finding a platform collision. The body is also animated, and in doing so, the ratio of width/height is altered.
What I really need is a way to find the lowest point of the Body so I can use the Y position to correctly find a platform using a point check.
I know I can use another rectangle slightly larger than the object mentioned and set that as a sensor, but I wanted to avoid using that if possible as the areas I need to detect are quite specific.
Any help would be great!
I have a rectangle object, wider than high. When its angle is 0, it is easy to find the offset to check bellow for a ground/platform collision. But, if I rotate the body 90 degrees, the offset is much lower causing problems for finding a platform collision. The body is also animated, and in doing so, the ratio of width/height is altered.
What I really need is a way to find the lowest point of the Body so I can use the Y position to correctly find a platform using a point check.
I know I can use another rectangle slightly larger than the object mentioned and set that as a sensor, but I wanted to avoid using that if possible as the areas I need to detect are quite specific.
Any help would be great!