- Home /
How to check the place before drop the object
Hi I need to drop cubes on the plane in random order. But first I need to check is there any object on the land in the point where cube could fall. If yes cube will fall somethere else if no cube can fall on this point. I think colliders and triggers are not acceptable for this task. Ray could give a way of solution, but I think I should use bounds and intersection check. I mean perform a check by creating a bounding box or something like that then check its intersection in boolean way. True will mean - the place is occupied so cube cant fall. False - will mean placr the place is free so cube can fall there. How can I do that? How to build a kind of box sensor simmilar to sphere cast or capsule cast using origin center and dimensions. Can somebody help me
Answer by gregzo · Apr 11, 2012 at 01:43 PM
Why not use raycasting?
And if you want to check against bounds, why not use an invisible object with a collider, set to isTrigger?
Either method would work fine, IMO.
Your answer
Follow this Question
Related Questions
Internal collisions 1 Answer
Positioning gameobject on collider bounds. 1 Answer
2D box colliders gap 0 Answers
Multiple Colliders Trigger problem 2 Answers