hello guys and girls,
i’m currently in the process fo writing a shoot em up on unity, but am having trouble getting a 3d text to appear within my function ontrigger. I’m using particles aswell, maybe that is the problem.
here’s my code for the collision between bullet and enemy.
function OnTriggerEnter(otherObject: Collider){
if(otherObject.gameObject.tag == "enemy1"){
playerScript.playerScore +=100;
otherObject.gameObject.transform.position.y =7;
otherObject.gameObject.transform.position.x = Random.Range(-6,6);
var tempExplosion: Transform;
tempExplosion = Instantiate(explosion,transform.position, transform.rotation);
Destroy(gameObject);
Any ideas?
Thank you