As a Roblox developer it is currently impossible to detect if a point is in any part with 100% accuracy if we make the assumption that Roblox’s public API functions are 100% accurate
Currently there are 2 commendable methods you can try: Region3 and GetTouchingParts
Region3 is very inaccurate as it does bounding boxes and you can only search in 4x4x4 voxel buckets (with no extra pruning afterwards done by Roblox?)
GetTouchingParts could be amazing except for the fact that parts cannot be smaller than 0.05x0.05x0.05 (so this leads to some horrible bugs such as a complicated edge case I experienced when replicating the (deprecated?) Roblox .Position or .Shape which forced me to not support concave meshes)
Being able to raycast from inside parts and have a result that somehow states that the origin is within the part would be 11/10 but even a workspace:GetPartsAtPointWithIgnorelist(Vector3 position,int maxParts) would be amazing
its for a pet to stay above ground when terrain height changes
so i would check if point is in part then do rotated bounding box query to go above the part but if it might overshoot if its mesh/union/non rectangular prism primitive so then i would raycast down
problem is racasting has thickness 0
gettouching parts doesnt
so when pet is walking off edge
it willl infinitely go up and back down because of the difference in thickness resulting in game crash
(unless you say previously used parts cant be used again - although i realize now (or i probably realized before and just forgot lmao) that even if i didnt ignore with that method concave objects couldn’t be supported)
also i think you could argue that in general GetTouchingParts is a bad idea