|
I am trying to make a script so when the object the script is attached to collides with the target (waypoint end) the object will get destroyed. But when it is about to collide my object gets stopped by some sort of force field :o. Here is my code: var waypoint : Transform; var speed: float = 20;
What is wrong? Thanks in advance. NOTE: The collision error occurs only with the waypoint script.
(comments are locked)
|
|
Try change this:
to this:
Otherwise it'll be stopping 1m away from your object It seems to be touching/colliding but the thing doesnt get destroyed.
Jul 22 '10 at 09:19 PM
MikezNesh
also my building seems to sense collision but my soldier doesnt get destroyed....why is that?
Jul 22 '10 at 09:29 PM
MikezNesh
should be col.transform instead of col.gameObject (as waypoint is a transform)
Jul 22 '10 at 10:01 PM
Mike 3
Aahhh...nice catch Mike thanks so much! :D
Jul 22 '10 at 10:03 PM
MikezNesh
(comments are locked)
|
