Object Collision is broken
-
So I was making a project with collisions using objectIntersect, I noticed that the collision seemed very broken so I decided to turn on showObjectBounds and I saw something that shouldn't happen. The player's hitbox was fine but the walls hitbox wasn't. On the z and y axis it was fine(forward/backward, up/down) but on the x axis(left/right) it wasn't, it would extend from 0 to infinity. I really hope this gets patched.
-
@ILoveFuze Please could you share some code that shows this problem so that we can test it. Thanks
-
Out of curiosity, are you seeing bad behavior with cube hit boxes?
I have seen other shapes and models have reasonable hit boxes, but I have seen cubes with weird hit boxes.
-
@pianofire Here:
showObjectBounds(true, white, 1) player = placeObject(sphere, {0, 0, 5}, {1, 1, 1}) setObjectMaterial(player, grey, true, 0.5) world = placeObject(cube, {0, 1, -5}, {2, 2, 2}) r = 0 x = 0 z = 0 loop clear() movement() drawObjects() print(x) print("\n") print(z) update() function movement() c = controls(0) x += c.lx / 5 y += -c.ly / 5 if objectIntersect(player, world) then x -= (c.lx * 2) / 5 y -= (-c.ly * 2) / 5 endif setObjectPos(player, {x, 0, y}) //The reason it is z + 0.001 is because when the camera looks straight down, nothing renders setCamera({x, 10, z + 0.001}, {x, 0, z}) return void
If the glitch doesn't happen, I might have copied the code incorrectly, the only thing I added was a comment.
-
@ILoveFuze Thanks I will try it out
-
It seems to be happening on all my projects. However in another project the hitboxes are different.
-
Also the collision seems to change when reentering the project. The collisions were fine then I left and opened the project and they were messed up.
-
I too have been experiencing a collision bug.