Tuesday, 10 March 2015

Interactivity 5th session

We started this session off with creating a new script to destroy our object.

 Script looking as follows
 

 

However, since the OnTriggerEnter is checking for all collisions, the asteroid dissapears instantly. To fix this the script was adapted to the following

 
 

when the asteroids come in contact with bolts upon fire we created a explosion effect In to the script the script now looking as follows

 


 



The next step was adding a boundary box to the game so that the asteroid would spawn in off screen.


 The script looking as follows
 



to get our asteroids to spawn multiple times on a continues loop we added to do the script



 

No comments:

Post a Comment