1
$\begingroup$

I want to find a face center of a face I'm clicking on using the .ray_cast method. Since this method returns a face index, I thought I'll just use it to get the center coordinate from obj.data.polygons[face_index].center.

However when I have an object with a Mirror modifier with a Bisect option turned on, .ray_cast returns a face index of the original, not mirrored face even though I'm iterating on evaluated depsgraph. Here in this gif the printed face index is the same for both faces of the Mirror w/ Bisect object while two other objects return different proper values:

enter image description here

  • can I somehow get the correct face index?
  • maybe there's a different way of getting a face center coordinate that'd work on this object?

Here's a slightly modified version of the default Blender raycast template that prints out a face index.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.