RayCast not accurate on non-colliders (3D)

Okay, so here’s the breakdown.

This wasn’t an issue before, and I don’t know how long ago it became an issue.

I have a level designed in Blender and imported. It has a Navigation mesh to detect RayCast and to move the character.

I also have different objects, items to pick up, which have colliders on them.

Now, when I click, the Raycast goes out. As soon as I click, I return the transform position of wherever/whatever is clicked. Objects with colliders return the correct position, whereas, without a collider, it is the point, plus some extra?

Nothing else happens at this moment other than returning a value.

For instance, with the collider, the characters left eye returns (-8.8, 1.8, 17.1), but without it is (-8.9, -1.5, 11).

I have another object which is sat on the ground. The coordinates are (-13, 0.5, 13.7) with collider and (-14.8, -1.5, 9.8) without collider.

Even just moving the mouse off the object without turning off the colliders makes the “jump”, and clearing the navmesh makes no difference.

The constant in this is the -1.5 value.

I’d post my code, but I don’t know how, however, it is rather basic/generic.

Hello,

I think you may be confused about how the Unity Physics.Raycast system works. The unity raycast system casts a ray against all colliders in the scene and returns detailed information on what was hit. In that sense there is no way for a raycast to interact with an object that does not have a collider. It is my belief that the reason your values are shifting as described above when you turn off the collider is because the raycast is merely hitting a different collider in your scene. To test this, try printing not only the position of the raycast hit, but also the name of the game object to which the collider is attached.