I created a brick object in Blender and created a new object by using the Cell Fracture to break it up into debris so I can instantiate it after destroying the brick object to simulate it being destroyed.
The problem is when the brick is destroyed, the debris instantiates a few units above the brick instead of the brick’s original position. I’m pretty new to Unity but this is so simple that I can’t figure out why exactly the debris isn’t instantiating in the original position.
using UnityEngine;
using System.Collections;
public class Destructible : MonoBehaviour {
public GameObject debrisPrefab;
void OnCollisionEnter (Collision col){
if(debrisPrefab){
Instantiate(debrisPrefab, transform.position, transform.rotation);
}
Destroy(gameObject);
}
}
Is this something going on with my model inside of Blender?