|
well, I'd like to Instantiate a line from my camera and make it go through all colliders in the scene, then I apply the function SendMessage() so that I can apply a damage to it; Here's the code:
(comments are locked)
|
|
Use this: http://unity3d.com/support/documentation/ScriptReference/Physics.RaycastAll.html It will run through and give you a list of everything hit by the raycast. Then use that list to call functions on them.
(comments are locked)
|
