void shoot() { //pointAtPlayer RaycastHit hit; Anim.SetFloat("lookDirection", Mathf.Lerp(Anim.GetFloat("lookDirection"), target() + targetOffset - targetOffset * (DistanceBetweenPlayerAndThis - attackRange) / DistanceBetweenPlayerAndThis, targetSmoother)); moving = false; GunPlaceHolder.shoot(); }
// Update is called once per frame void Update() { move(); point_at_mouse(); //Debug.Log(verticalVelocity+" "+inAirtime); if (Input.GetAxis("Fire1") == 1) { isShooting = gunHolder.shoot(); } else { isShooting = false; } }