OK, so essentially, I have script that emits a raycast forward from the camera, and moves grabbed objects to the hit-point. However, this presents the problem of the objects colliding into walls and into the floor when i release them.
I've tried displacing the position the grabbed object's position based on their extents, which works for cubic objects oriented towards the camera, pointed at flat walls, but not for any other situation.
![alt text][1]
![alt text][2]
As you can see, the picked up object is rendered on a layer above the standard camera layer.
My question is, how can i prevent the objects from being projected into positions where they would not fit, such as in corners, or through small gaps, or generally just walls and floors?
[1]: /storage/temp/71536-65944-64372-screenshot-2.jpg
[2]: /storage/temp/71537-65943-64371-screenshot-1.jpg
↧