Beispiel #1
0
            private void FixedUpdate()
            {
                if (turret != null)
                {
                    turret.SetTarget(null);
                    shooter = mainBoat.mountPoints[4].mountable.GetMounted();

                    if (shooter != null)
                    {
                        turret.aimDir = shooter.eyes.HeadRay().direction;
                        turret?.SendAimDir();
                        turret?.UpdateAiming();
                    }
                    else
                    {
                        turret.aimDir = mainBoat.transform.forward;
                        turret?.SendAimDir();
                        turret?.UpdateAiming();
                    }
                }
            }