- Home /
Best way to tear apart a piece of paper?
Remember the game at the carnival that allowed to you shoot a bb gun at a target with the red star and if you removed the entire red star from the paper target you won a prize?
I'm working on that game.. major stumbling block for me.. how do you tear apart the paper?
I have a couple of ideas, but neither really seems that good. 1) pre-tear up the paper and piece it together and allow them to take it apart - seems to static, not random enough 2) where the bb's hit, make a black dot on the paper (really thin cube primitive likely) - not realistic or that fun since the paper wouldn't tear..
Any other ideas?
Answer by spinaljack · Sep 24, 2010 at 09:36 PM
Make the paper out of many triangles, where the bullet hits fade out the alpha on those verts so that you can see through the paper, instantiate paper tear models around the hole.
Then when the 2nd shot is fired check if it is next to a previous hole and then join them up to make a bigger hole so you don't end up with loads of tear models floating about.
You can use raycast to return which triangle was hit:
http://unity3d.com/support/documentation/ScriptReference/RaycastHit-triangleIndex.html
Sounds interesting.. So I would create a sheet of tiny triangles in a 3d modeling program and import it? (I use blender) Then play with its alpha to make it look like the triangle has been shot out.. what do you mean by "instantiate paper $$anonymous$$r models"?
I think the basic unity plane is already made up of triangles but you can do it in a modelling software if you want. The paper $$anonymous$$r models would be bits of paper hanging off, it's up to you if you would prefer no bits of paper hanging off. Also Unity 3 will have cloth physics so you can actually $$anonymous$$r bits off with physics :)
$$anonymous$$ark the answer correct, and it will signal that you did.