Messed up World:rayCast()?
Posted: Mon Nov 19, 2018 8:06 pm
Hello, like the title says, it seems like the rayCast method is messed up in the sense that it just straight up seems to skip objects to check for collision against. Here are a couple of pictures to show you what my problem is.
1. there is a :rayCast from the 1st body to the 2nd, there is nothing in-between and everything is OK.
2. placed a wall that serves as an obstacle, the wall seems to be occluding the :rayCast just fine. Everything is OK.
3. now I move a couple of pixels to the right away from the wall, and bam, it's ignoring the obstacle. What the hell is going on?
Additionally, here's a video which shows even more weird stuff: https://www.dropbox.com/s/xefdxde4zrw0c ... 6.mp4?dl=0
Here's another video which showcases more errata when it comes to obstacles and multiple objects: https://www.dropbox.com/s/vw3zmouhexjp5 ... 7.mp4?dl=0
It's as if the query for objects to check the collision against is not working properly.
I've checked the position of the wall obstacle, and it doesn't change before/after I move (it's not meant to, anyway), the wall obstacles are static objects, and collision detection works just fine, but raycasting messes up and just ignores that object completely. Has anyone else had a similar problem? This is incredibly infuriating because I am not doing anything wrong as far as I'm concerned, especially considering that the start/finish positions check out just fine.
This happens using both 0.10.2 and 11.1, so I am at a complete loss right now.
I've googled this issue, but found no one else having the same problem in the LOVE2D community, yet at the same time someone else was having a similar issue with Box2D outside of LOVE2D so maybe this has something to do with Box2D itself?
I've tried calling :setSleepingAllowed(false) on the world object to prevent objects from sleeping (I was thinking maybe the walls were doing that and it was ignoring them?). That didn't help. I tried manually disabling sleeping on wall obstacles, that didn't help either. I'm clueless as to what the hell is going on at the moment.
Any help would be appreciated.
1. there is a :rayCast from the 1st body to the 2nd, there is nothing in-between and everything is OK.
2. placed a wall that serves as an obstacle, the wall seems to be occluding the :rayCast just fine. Everything is OK.
3. now I move a couple of pixels to the right away from the wall, and bam, it's ignoring the obstacle. What the hell is going on?
Additionally, here's a video which shows even more weird stuff: https://www.dropbox.com/s/xefdxde4zrw0c ... 6.mp4?dl=0
Here's another video which showcases more errata when it comes to obstacles and multiple objects: https://www.dropbox.com/s/vw3zmouhexjp5 ... 7.mp4?dl=0
It's as if the query for objects to check the collision against is not working properly.
I've checked the position of the wall obstacle, and it doesn't change before/after I move (it's not meant to, anyway), the wall obstacles are static objects, and collision detection works just fine, but raycasting messes up and just ignores that object completely. Has anyone else had a similar problem? This is incredibly infuriating because I am not doing anything wrong as far as I'm concerned, especially considering that the start/finish positions check out just fine.
This happens using both 0.10.2 and 11.1, so I am at a complete loss right now.
I've googled this issue, but found no one else having the same problem in the LOVE2D community, yet at the same time someone else was having a similar issue with Box2D outside of LOVE2D so maybe this has something to do with Box2D itself?
I've tried calling :setSleepingAllowed(false) on the world object to prevent objects from sleeping (I was thinking maybe the walls were doing that and it was ignoring them?). That didn't help. I tried manually disabling sleeping on wall obstacles, that didn't help either. I'm clueless as to what the hell is going on at the moment.
Any help would be appreciated.