Exemple #1
0
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }


        if (detected)
        {
            ActionCam.ActionBullet(2.0f);
            ActionCam.ObjectLookAt = null;
            ActionCam.SlowmotionNow(0.1f, 1.6f);
            ActionCam.Follow = false;
            ActionCam.SetPosition(ActionCam.transform.position, ActionCam.Detected);
            ActionCam.ResetFOV();
        }
        else
        {
            // in case of missed prediction of hit point.
            // action camera will try to get new position as close as hit point

            ActionCam.FOVTarget = 20;
            ActionCam.ActionBullet(2.0f);
            ActionCam.ObjectLookAt = null;
            ActionCam.SlowmotionNow(0.1f, 1.6f);
            ActionCam.Follow = false;
            ActionCam.SetPosition(point - bullet.transform.forward * 5 * ZoomMulti, false);
            ActionCam.lookAtPosition = point;
        }

        base.TargetHited(bullet, target, point);
    }
Exemple #2
0
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        ActionCam.ClearTarget();
        ActionCam.ResetFOV();
        base.TargetHited(bullet, target, point);
    }
Exemple #3
0
 public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
 {
     if (!ActionCam)
     {
         return;
     }
     if (!ActionCam.Detected)
     {
         ActionCam.SetPositionDistance(target.transform.position, false);
     }
     ActionCam.ResetFOV();
     ActionCam.ObjectFollowing = null;
     ActionCam.Follow          = false;
     ActionCam.ObjectLookAt    = null;
     base.TargetHited(bullet, target, point);
 }