Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Destroy object on collision or check position

$
0
0
In the scenario where multiple `rigidBody`s moving due to `addForce` goes out of view (say, top of view) and is no longer needed then what technique should be prefered? 1. Destroying the `gameObject` by detecting collision - by creating a `collider` object and destroying the `rigidBody` when it collides with it 2. Destroying the `gameObject` by first checking it's `rigidBody` position in `Update` or `FixedUpdate` Premature optimization or not, I'd still like to know Thanks,

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>