I have the following code to check if two objects overlapping and it's works well, I don't understand how to check overlapping for objects in pose position
Source of this code: https://blender.stackexchange.com/a/150047/97742
import bpy
from mathutils.bvhtree import BVHTree
# Get the objects
obj1 = bpy.data.objects["Cube"]
obj2 = bpy.data.objects["Suzanne"]
# Get their world matrix
mat1 = obj1.matrix_world
mat2 = obj2.matrix_world
# Get the geometry in world coordinates
vert1 = [mat1 @ v.co for v in obj1.data.vertices]
poly1 = [p.vertices for p in obj1.data.polygons]
vert2 = [mat2 @ v.co for v in obj2.data.vertices]
poly2 = [p.vertices for p in obj2.data.polygons]
# Create the BVH trees
bvh1 = BVHTree.FromPolygons( vert1, poly1 )
bvh2 = BVHTree.FromPolygons( vert2, poly2 )
# Test if overlap
if bvh1.overlap( bvh2 ):
print( "Overlap" )
else:
print( "No overlap" )