How do I make a raycast ignore the empty space in between the edges of a model?

Hello people, I am trying to make a hair shaving system by moving bones in a MeshPart, however I ran into a small problem along the way (the system works but this is making some issues)

  1. What do you want to achieve?
    I want FindPartOnRay to not return a part if the Ray only passed through the border of the MeshPart, not the actual visible part of the MeshPart

  2. What is the issue?
    When using FindPartOnRay, the function will return that it found a part on the ray even though the ray only passed through the borders of the MeshPart (the box you would see when you select a part in studio) and DID NOT touch the actual visible part of the MeshPart.

Here is an image of the border Iā€™m reffering to:

  1. What solutions have you tried so far? I tried looking for similiar posts and answers on the DevForum and other places but to no avail.

Try setting the CollisionFidelity on the mesh to PreciseConvexDecomposition.

That worked perfectly, thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.