x


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?

more ▼

asked Dec 19 '11 at 10:53 PM

StormCassidy gravatar image

StormCassidy
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

SPAM

more ▼

answered Feb 15 '12 at 11:40 AM

3dSUE gravatar image

3dSUE
0

(comments are locked)
10|3000 characters needed characters left

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 :)

more ▼

answered Apr 11 '12 at 12:34 AM

pparreira gravatar image

pparreira
0

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x317
x248
x127
x80
x55

asked: Dec 19 '11 at 10:53 PM

Seen: 831 times

Last Updated: Apr 11 '12 at 12:34 AM