#gun shoot code not working
8 messages · Page 1 of 1 (latest)
Also, why would the delay be working?
You are literally setting canShoot to true every time before you check it...
@hardy snow You are correct about the Shooting, but I think the bullet should move ( the implementation is incorrect but it should move) as the above code is applying an impulse force.
Most probably your bullet is colliding with your player collider and stopping itself, can you check if the layers are set correctly?
How so?
The force is applied to bulletRb. Which is only assigned once, in Start.
Bullet instances created by Instantiate will not reference that same Rigidbody. And thus, they won't receive the AddForce call that should move them.