- Home /
Question by
danfri · Nov 08, 2011 at 04:21 AM ·
collisiononcollisionentercollisiondetection
Testing for collisions prior to placing an object
I want to be able to test a location prior to placing a game gameobject in that location for possible collisions. Currently, I place the object, it is rendered, and only then is the OnCollisionEnter on the object called, allowing the object to be drawn briefly prior to it removing itself. Is there a way to force the collision test to occur immediately, rather than after the next frame? The object is currently using a box collider and sits amongst objects largely rectangular and very close to each other, so the Physics.OverlapSphere test (which seems to do what I'm asking) would not be preferable.
Comment