Hello!
I have my sentry gun in the center of my scenes, it finds the player and starts to fire!
But at the moment it fires only 1 shot, and i want to shot at least 1 shot every second!
I used FPS unity tutorial to write the code but it doesn’t work on my game!
Here the code:
public float reload_time = 1.0F;
private float nextFire = 0.0
if(Vector3.Angle(forward, targetDir) < shootAngleDistance && Time.time > nextFire){
nextFire = Time.time + reload_time;
Fire();
}