|
I had a working script, then somewhere along the line something got deleted and I cannot figure out how to get back to where is was. I have a driveable tank with a game object attached to the end of the barrel that fires projectiles on a left mouse click. With the following script however, my bullets spawn but dont move. What have I miscalculated?
(comments are locked)
|
|
Maybe it get stuck with the collider, try adding this: Physics.IgnoreCollision(bullet.collider, transform.root.collider); or Physics.IgnoreCollision(instance.collider, transform.root.collider);
(comments are locked)
|
|
You wrote GetButtonUp, but you may want try to replace it by GetButton or GetButtonDown.
(comments are locked)
|

Is it possible that the bullets are colliding with the tank before they start moving, and that's stunting them back into being stationary? EDIT - See Neurological's answer to see what I mean.