Detecting if a point is inside a PreciseConvexDecomposition mesh

Is it possible for me to see if a point is inside a mesh part that has its CollisionFidelity set to PreciseConvexDecomposition (so only classifying the point as being inside the mesh part if it’s inside the collision geometry, not the actual mesh part) given that:

  • CanCollide is false
  • The mesh part is having its CFrame set every frame and is anchored
1 Like


What do you need to do this for? Maybe there’s an easier option.

Here’s my way: Make a part which size is, 0.05, 0.05), and the shape Enum.ball.

Then using GetTouchingParts to see if it intersects with the mesh. (GetTouchingParts uses the collision geometry of the part).

local CachedPart;

local function IsPointInPart(Part: BasePart, Point)
	local Connection = Part.Touched:Connect(function() end) -- Connect a touchedevent to add a touchtransimitter. (Makes it work for non cancollide parts) 
	if CachedPart == nil then
		CachedPart ='Part')
		CachedPart.Shape = Enum.PartType.Ball
		CachedPart.CanCollide =  true
		CachedPart.Parent = workspace
		CachedPart.Transparency = 1
		CachedPart.Anchored = true
                CachedPart.Position = Point
	for i,v in pairs(CachedPart:GetTouchingParts()) do
		if v == Part then
			return true

	return false

Also an other way to do this is by using region3.