I am having an issue using the cubes framework. It seems that the collision point that is detected is somewhat distant from the actual location, resulting in the correct cube not being found correctly.
Trying to get a cube at x=8, y=6, z=8 sometimes results in this:
[Vector3Int x=8 y=6 z=7]// location of “block”
(8.058348, 6.0886364, 7.98) //collision point.
Why is this? I have a RigidBodyControl in place for when I develop better collision detection, however, I removed that, and the problem persists. Also, there don’t appear to be any locations on the cube that are affected the most. It seems fairly random. Sometimes the collision is detected, other times, it isn’t.
I see what is being said here, but I am not understanding why the accuracy is so low. I understand that the integer is round down.
If the surface is flat at lets say x=8. Then why would the collision point be located at 7.98? I just feel that this is a little far off.
Thanks for the help. As it turned out, I was colliding around an outline that was surrounding the block. Keep that in mind folks. Make sure the mesh you are colliding with is actually the one you intend it to be.