of     1   

HumanMop
#149936012Monday, November 17, 2014 6:26 AM GMT

Is there a way to do this? It'd be simplistic if Vector3s passed a "IsColliding" property, but they don't. I'm sure there's some math involved, or a clever trick, I can't come up with one. -=Robo=-
Tunicus
#149936439Monday, November 17, 2014 6:46 AM GMT

I would assume it would be a multitude of simple conditionals if you disregarded shape and rotation.
128GB
#149936856Monday, November 17, 2014 7:05 AM GMT

Unless you bring size of a part into account, unless the Vector3's are exactly the same they won't over lap
TecmagDiams
#149937917Monday, November 17, 2014 8:01 AM GMT

The easiest way yo do it would be to translate the CordinateFrame into Object space with the item you are collision checking it with, then see if it lies within the objects space. For example: function isTouching(part, cf) local norm = part.CFrame:toObjectSpace(cf) if (norm.x part.CFrame.x + part.Size.x) or (norm.y part.CFrame.x + part.Size.y) or (norm.z part.CFrame.x + part.Size.z) then return false else return true end end
TecmagDiams
#149937922Monday, November 17, 2014 8:02 AM GMT

Also let it be known I didn't double check that code to make sure I set it up proper, it was just a demonstration of the idea.
HumanMop
#149951832Monday, November 17, 2014 7:02 PM GMT

@Tecmag That's actually not bad, I like the idea and I appreciate the answer. How do you think I could effectively do this dynamically? In other words, without relying on a specific part collision. I'm not sure if it'd be considerably efficient to cycle through every part in the workspace, so that's out of the question. Maybe raycast from the camera's subject(assuming that's the coordinate frame we're referring to) to detect collisions? -=Robo=-

    of     1