- Home /
Laser not causing damage
I'm trying to do the Lerpz tutorial thing and I'm at the point where I make the lasers. I've got them in the scene, and they move and glow and all that stuff. But for some reason, they don't cause any damage to my character. I followed the tutorial steps exactly, but it's not working. Anyone know what's wrong with it?
Answer by pparreira · Apr 11, 2012 at 12:34 AM
Sorry to bring this back from the dead, but I came across the same problem and figured I'd post the answer for future reference :) If you follow the tutorial it tells you to place the laser at the entrance of the tunnel that leads to the arena. If you look at the script for the laser you'll notice this line:
if (hit.collider.tag == "Player" || hit.collider.tag == "Enemy")
What's happening is you've probably placed the laser so that it's always touching the walls of the tunnel. It never hits Lerpz because it's constantly hitting the tunnel wall, which is also a collidable object.
You need to place the laser so that it doesn't touch the walls (scale it on the z axis to make it smaller) OR you can make the laser ignore the tunnel wall object (it's named 'laserTunnels').
Hope this helps someone :)
Your answer
Follow this Question
Related Questions
Lerpz Demo Just Falls From the Sky 2 Answers
Lerpz do not move at all 1 Answer
Lerpz tutorial problems 2 Answers
I am using the Lerpz 3d Platformer Tutorial and I can't find the fire-add material. 0 Answers
Lerpz tutorial page 22 1 Answer