|
hi again.. i need some help on this topic here... i'll post a youtube link and describe it as well... http://www.youtube.com/watch?v=C4iO1Gl7wiA its from Tom Calancy's HAWX.. i want to create multiple bullets/ missiles/ etc.. to my space ship.. similar to the youtube clip.. does anyone have any ideas on doing this?? thanks for reading.. and your patience is highly appreciated..
(comments are locked)
|
|
All shots are 'instances' meaning a "shallow copy" of the original. They reference the same /mesh,position,rotation,etc/ of the original but will not be as costly as a "New" version of that prefab. In this case you will have one MAIN version of the shot (var myRocket) which can now be used in (var rocket=Instantiate(myRocket,'somePosition',Quaternion.identity) which makes the shallow copy, not quite as processor intensive as creating that same object from scratch with the same mesh,position,rotation as the original. In doing so you create a new way for unity to look at this "new" object(reference to the original), instead of looking at it as a completely new object entirely. This save speed and lines of code, and will be able to create 10 instances faster than 1 new org object of the same type. If you are shooting on one script...say something like the previous idea
Jun 20 '12 at 08:54 AM
hijinxbassist
thanks... i'll try it.. but i need some more reference and some snippet codes or something.. appreciate it @hijinxbassist..
Jun 20 '12 at 09:18 AM
zerox911
Since you dont have any code in your questions its tough to guess the proper coding technique. This is a basic structure which i provide, here is a little more on top of that..again tough to give specifics w.o actually code present
Jun 20 '12 at 11:18 AM
hijinxbassist
(comments are locked)
|
