I'm on my unity (iPhone) learning curve and working on a arcade shooter game...
I want to use a billboard/sprite prefab for weapon projectile. I will instantiate this prefab when the player presses the fire button.
I would like the prefab to have the following characteristics:
Not finding much documentation on creating a billboard (sprite) based prefab but perhaps I not searching correctly.
Can someone point me to documentation or provide some guidance? Thanks for any help!
asked Sep 07 '10 at 04:06 AM
Make a billboard mesh to use for your object and use a script with Transform.LookAt to make it look at the camera in every Update.
As for doing sprite animation, search for sprite animation. (You'll probably find that putting all the animation frames into a single texture and using UV offsets to animate is a more common method to use than using separate images.)
answered Sep 07 '10 at 11:01 AM
This assumes you've put everything onto a texture atlas and you have 64 frames of animation... I wrote this while mildly drunk, and you'll need to put a transform.LookAt(camera.position) sort of dealio on it. I'm sure you'll figure it out :)
You could easily make this work with any number of frames.
answered Sep 07 '10 at 01:46 PM