Quantcast
Channel: Questions in topic: "clone"
Viewing all articles
Browse latest Browse all 508

How do I explode multiple clones out of an object?

$
0
0
How do I explode multiple clones out of an object? I have an asteroid which when killed I want to create multiple smaller clones of itself. for (int i = 0; i < 3; i++) { Transform clone = Instantiate(transform, transform.position, Quaternion.identity) as Transform; Vector3 scale = transform.localScale; scale.x /= 2; scale.y /= 2; scale.z /= 2; clone.localScale = scale; } But because they are rigid bodies they just fly out from each other. How can I instantiate them so the explode out in a uniform pattern?

Viewing all articles
Browse latest Browse all 508

Trending Articles



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