#About inconsistent Raycast

1 messages · Page 1 of 1 (latest)

ripe fox
#

Is your ray distance same as gizmo?

hushed ridge
#

Let me check, good idea

#

also cool sub-chat

ripe fox
#

Yeah the channel gets crowded

hushed ridge
#

So the test_ray is 20 units long, and the physics raycast is 6. however, i can see that the physics raycast is hitting the element behind the cylinder when it misses the cylinder, so i don't believe length is an issue

ripe fox
#

Oh so it is hitting something else?

#

You might want to try Physics.RaycastAll and select nearest object in that case

hushed ridge
#

so that red dot is where it's hitting, despite obviously going through another object

#

the dark grey is the table i mentioned earlier

ripe fox
#

Hmm or the layer is not correct

#

Is cylinder and the other object have different layer?

hushed ridge
#

Oh my gosh I believe I see the problem. This might have been my fault, but do cylinders normally have capsule colliders?

ripe fox
#

Ooh lol yes... there is no such as CylinderCollider

hushed ridge
#

HA! I am very glad. I believe that's the entire problem then. Thank you so much for helping me. If there's anything I can do to thank you, please let me know!