I am making a horror game and I want a light that has been shorting out to suddenly break and shards (gibs) of glass fall to the ground.
How would I go about instantiating gibs in a circular pattern around the light that might give a realistic feel to glass shards falling from the light.
I was trying to randomly position the gibs around the position of the light but it’s not looking well.
for(int i = 0; i< amountOfShards;i++)
{
randomNum = Random.Range(-0.5f,0.5f);
Rigidbody explodingShard;
randomPos = pos + new Vector3(randomNum, 0, randomNum);
explodingShard = Instantiate(shard, randomPos, transform.rotation) as Rigidbody;
}
Does anyone have a better method of doing this?
Here is an image of the light:
