x


shooting and seeing through walls.

ok so im following the tornado twins tutorial (the worm game) and ive got to the part where they add the code to destroy the turrets. for one before the next bit of code and after it, you can see the fireballs through walls. now we have had to enable "is trigger" to get it to work, but now the fireballs go through walls (they hit the turret though). anyway please help

kris

(p.s. is there such thing as a unity city generator, i couldent help but notice from one of the tornado twins tutorials (25#)

more ▼

asked Aug 18 '10 at 10:35 AM

kris 1 gravatar image

kris 1
22 3 4 5

Why don't you email the author directly?

Aug 18 '10 at 12:12 PM spinaljack
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

well i followed that tutorial also. the "is trigger" button means the if it doesn't it something it's supposed to it goes through it (that's why it hits the turret) it is used so the fireballs don't pile up in your way in your game. so nothing is wrong. P.S. here's the turret collision script if you needed it:

var explosion : Transform;

function OnTriggerEnter( hit : Collider ) {

if(hit.gameObject.tag == "name of your fireball's tag")

{

Destroy(hit.gameObject);

var exp = Instantiate(explosion, gameObject.transform.position, Quaternion.identity);

Destroy(gameObject);

}

}

more ▼

answered Aug 18 '10 at 01:35 PM

john 2 gravatar image

john 2
75 29 35 46

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

x72
x44
x20

asked: Aug 18 '10 at 10:35 AM

Seen: 914 times

Last Updated: Nov 06 '10 at 05:29 AM