x


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

more ▼

asked Apr 11 '12 at 10:23 AM

ausar gravatar image

ausar
2 1 2 3

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Apr 11 '12 at 01:43 PM

gregzo gravatar image

gregzo
1.6k 31 40 51

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1689
x161
x94

asked: Apr 11 '12 at 10:23 AM

Seen: 444 times

Last Updated: Apr 11 '12 at 01:43 PM