I am working on drop & drop in 3D. I have created 3D spaces (rooms) with walls (cubes) which act as place holders for objects (assume a smaller cubes) being dropped.
How do I go about figuring out :
if the user drops the object at edges of the room then could the room completely contain that object?
Meaning, I do not want the objects to be partially in the room and partially outside. Ideally I would cancel the drop operation / move it to a point so that room safely contains that object.
I have the bounds of the room & the object (ModelVisual3D.Content.Bounds) and the point at which the object was dropped.
I am thinking I would have to do some math to figure out if the object is placed at that point then it will completely within the bounding room.
ideas/thoughts/pointer appreciated.