- Home /
Player destroys when he touches particle effect.
Hi,im making lasers in my game,well i tried everything to get this work,but nothing,i want my player destroys when he touches laser.If i add mesh collider or rigibody to laser,it just goes crazy and is no longer usable,so is there any other way without adding anything,please help me? How can i Make Player Destroys when he touches laser?
are you using a rigidbody or character controller for the player? and is the laser a rigidbody? What type of collider is on the laser?
Answer by AlucardJay · Jul 10, 2012 at 08:24 AM
Imagine the laser is a raycast. So just raycast in the same direction and angle as the laser, and what the laser touches, you can find out with the hit info of the raycast.
seriously? The laser has to originate somewhere, and point in a certain direction. That's exactly the same as a raycast. Everything is set-up just to drop in a raycast and get the hit info of the collider, If collider = player > do stuff !
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
GUI cale and position according to the actual screen resolution. 1 Answer
Line Renderer Collision Detection. 2 Answers
Why does this script make my camera upside down? 0 Answers
I'm new at Unity, and I'd like to know what program I use to edit Java scripts 2 Answers