public static ICollisionData GetCollisionNode(XmlTextReader reader, out CollisionDataType type)
        {
            type = CollisionDataType.None;
            ICollisionData data = null;
            string result = reader.GetAttribute("type");
            if (result == null)
                throw new FileFormatException("Nieprawid³owy opis collision data w pliku ");
            switch (result)
            {
                case "BS":
                    type = CollisionDataType.CollisionSphere;
                    result = reader.GetAttribute("radius");
                    if (result == null)
                        throw new FileFormatException("Nieprawid³owy opis collision data w pliku ");
                    data = new CollisionSphere(float.Parse(result, _nfi));
                    break;
                case "Mesh":
                    type = CollisionDataType.CollisionMesh;
                    result = reader.GetAttribute("file");
                    if (result == null)
                        throw new FileFormatException("Nieprawid³owy opis collision data w pliku ");
                    data = CollisionMesh.FromFile(AppConfig.MeshPath + result, false);
                    break;
                case "Tree":
                    type = CollisionDataType.CollisionOctree;
                    result = reader.GetAttribute("file");
                    if (result == null)
                        throw new FileFormatException("Nieprawid³owy opis collision data w pliku ");
                    CollisionMesh m = CollisionMesh.FromFile(AppConfig.MeshPath + result, false);
                    data = CollisionOctree.FromMesh(m, 0, 0, 0, 20, 5, 100);
                    break;

            }
            return data;
        }
Example #2
0
        public Laser(long _uniqueID, Vector3 _position, Quaternion _rotation)
            : base(_uniqueID, _position, _rotation, "Models/Lasers/hot_pink_laser_model")
        {
            this.Damage = 1.0f;

            projectileSpeed = 4500.0f;

            if (!modelsSet)
            {
                basicLaserModel = ContentLoadManager.loadModel("Models/Lasers/hot_pink_laser_model");
                esxolusLaserModel = ContentLoadManager.loadModel("Models/Lasers/cyan_laser_model");
                halkLaserModel = ContentLoadManager.loadModel("Models/Lasers/red_laser_model");
                esxolusTurretLaserModel = ContentLoadManager.loadModel("Models/Lasers/cyan_turret_laser_model");
                halkTurretLaserModel = ContentLoadManager.loadModel("Models/Lasers/red_turret_laser_model");
                modelsSet = true;
            }
            else { }

            CollisionBase = new CollisionSphere(Position, (int)(Model.Meshes.First().BoundingSphere.Radius * RESIZE));

            ((Sphere)CollisionBase.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = projectileGroup;

            CollisionBase.Active = false;
            CollisionBase.Parent = this;
            CollisionBase.addCollisionEvent(collisionEvent);
        }
Example #3
0
        /// <summary>
        /// Check to see if the Enemy collides with another Sprite
        /// </summary>
        /// <param name="sprite">The Sprite to check collision against</param>
        /// <returns>True if their spheres intersect, false otherwise</returns>
        virtual public bool Collides(Sprite sprite)
        {
            // Make sure these sprites can even collide
            if (!Collideable || !sprite.Collideable)
            {
                return(false);
            }

            // BoundingSphere collision check
            var result = CollisionSphere.Intersects(sprite.CollisionSphere);

            // If there was a collision
            if (result)
            {
                // Stop moving
                Velocity = Vector2.Zero;

                // Disable collision on this Enemy
                EnableCollision(false);

                // Play the Break animation
                PlayAnimation("Break");

                // It has been damaged
                IsDamaged = true;

                // Play the break sound
                BreakSound.Play();
            }

            // Return the collision result
            return(result);
        }
        /// <summary>
        /// Carga el contenido gráfico del componente
        /// </summary>
        protected override void LoadContent()
        {
            this.m_BasicEffect = new BasicEffect(this.GraphicsDevice, null);
            this.m_BasicEffect.EnableDefaultLighting();

            this.m_Sphere = new CollisionSphere(this.Radius, this.Mass);

            VertexPositionNormalTexture[] buffer = null;
            Int16[] indices = null;

            PolyGenerator.InitializeSphere(out buffer, out indices, this.Radius);

            this.m_Geometry = new BufferedGeometryInfo()
            {
                FillMode          = FillMode.Solid,
                PrimitiveType     = PrimitiveType.TriangleList,
                Indexed           = true,
                Vertices          = buffer,
                Indices           = indices,
                VertexDeclaration = new VertexDeclaration(this.GraphicsDevice, VertexPositionNormalTexture.VertexElements),
                Texture           = this.Game.Content.Load <Texture2D>(@"Content/dharma"),
                PrimitiveCount    = indices.Length / 3,
            };

            base.LoadContent();
        }
Example #5
0
 //Set Collider radius and spheres
 private void SetCollisionParameters()
 {
     radius = myCollider.radius * myCollider.transform.localScale.x;
     if (myCollider)
     {
         for (int i = 0; i < numberOfSpheres; i++)
         {
             if (i == 0)
             {
                 sphere.isFeet = true;
                 sphere.isHead = false;
                 sphere.offset = radius;
                 feet          = sphere;
             }
             else if (i == numberOfSpheres - 1)
             {
                 sphere.isFeet = false;
                 sphere.isHead = true;
                 sphere.offset = (myCollider.height * myCollider.transform.localScale.y - radius);
             }
             else
             {
                 sphere.isFeet = false;
                 sphere.isHead = false;
                 //TODO Add sphere offset if number of spheres is greater than two!
             }
             collisionSpheres.Add(sphere);
         }
     }
     else
     {
         Debug.LogWarning("Please attach a capsule collider to character");
     }
 }
Example #6
0
        public Missile(long _uniqueID, Vector3 _position, Quaternion _rotation, String _model)
            : base(_uniqueID, _position, _rotation, _model)
        {
            Damage = 55.0f;

            projectileSpeed = MISSILE_SPEED;

            trailGenerator = new MissileTrailParticleGenerator(this);
            trailGenerator.Active = false;

            detectionSphere = new CollisionSphere(_position, detectionRange);
            detectionSphere.addCollisionEvent(collisionEvent);

            detectionSphere.Active = false;
            detectionSphere.Parent = this;

            CollisionBase.Active = false;
            CollisionBase.Parent = this;

            firstTrailingSphere = new CollisionSphere(_position, BASE_SIZE);
            firstTrailingSphere.addCollisionEvent(collisionEvent);
            firstTrailingSphere.Active = false;
            firstTrailingSphere.Parent = this;
            ((Sphere)firstTrailingSphere.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = projectileGroup;

            secondTrailingSphere = new CollisionSphere(_position, BASE_SIZE);
            secondTrailingSphere.addCollisionEvent(collisionEvent);
            secondTrailingSphere.Active = false;
            secondTrailingSphere.Parent = this;
            ((Sphere)secondTrailingSphere.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = projectileGroup;
        }
Example #7
0
        private void DetectCollisions(CollisionSphere sphere, CollisionData data)
        {
            foreach (var plane in Planes)
            {
                CollisionDetector.SphereAndHalfSpace(sphere, plane, data);
            }

            foreach (var primative in Primatives)
            {
                if (primative == sphere)
                {
                    continue;
                }
                if (data.NoMoreContacts())
                {
                    break;
                }

                switch (primative)
                {
                case CollisionSphere sphere2:
                    CollisionDetector.SphereAndSphere(sphere, sphere2, data);
                    break;

                case CollisionBox box:
                    CollisionDetector.BoxAndSphere(box, sphere, data);
                    break;
                }
            }
        }
        public AIPilotingState(AI _ai)
            : base(_ai)
        {
            StateComplete = false;

            random = new Random(System.DateTime.Now.Millisecond + (int)ai.Ship.UniqueId);

            targetCheckTimer = TARGET_CHECK_TIMER + (float)(random.Next(1,3) * random.NextDouble());

            targetSphere = new CollisionSphere(ai.Ship.Position, TARGET_SPHERE_SIZE);
            targetSphere.Active = true;

            boostSphere = new CollisionSphere(ai.Ship.Position, BOOST_SPHERE_SIZE);
            brakeSphere = new CollisionSphere(ai.Ship.Position, BRAKE_SPHERE_SIZE);

            pursuitRetreatSphere = new CollisionSphere(ai.Ship.Position, P_RETREAT_SPHERE_SIZE);
            engageRetreatSphere = new CollisionSphere(ai.Ship.Position, E_RETREAT_SPHERE_SIZE);

            FIRE_RATE = ai.Ship.FireRate;
            SPECIAL_RATE = ai.Ship.SpecialRate;

            speedUpdateTimer = SPEED_UPDATE_RATE;
            retreatUpdateTimer = RETREAT_UPDATE_RATE;

            ai.aiShared.INTEREST_TIME = ai.Ship.InterestTime + (float)random.NextDouble();
            ai.aiShared.interestTimer = ai.aiShared.INTEREST_TIME;
            ai.aiShared.fleeCounter = 0;
        }
        public Interceptor(long _uniqueId, Vector3 _position, Quaternion _rotation, Team _team, SpawnShip _home)
            : base(_uniqueId, _position, _rotation, _team, _home)
        {
            maxZSpeed = 10000.0f;
            minZSpeed = 300.0f;
            normalZSpeed = 500.0f;
            ZSpeed = NormalZSpeed;

            MAX_HEALTH = 3;
            Health = MaxHealth;

            MAX_SHIELDS = 1;
            Shields = MaxShields;

            SHIELD_RECOVER_RATE = 0.2f;

            rollAccel = 10.0f;
            rollBreak = 5.0f;
            rollCap = 2.5f;

            pitchAccel = 7.5f;
            pitchBreak = 5.0f;
            pitchCap = 1.5f;

            yawAccel = 7.5f;
            yawBreak = 5.0f;
            yawCap = 1.5f;

            baseHeat = 0.55f;
            heat = 0;
            overheatHeat = 1.5f;
            heatingRate = 1.5f;
            coolingRate = 0.25f;
            heatDamageRate = 0.1f;
            heatWarningThreshold = 1.2f;
            heatDamageThreshold = 1.4f;

            accelerationRate = 25000.0f;

            FIRE_RATE = 0.1f;
            fireTimer = FireRate;

            SPECIAL_RATE = 0.5f;
            specialTimer = SpecialRate;

            PRIMARY_RANGE = 100000000f;

            CollisionBase = new CollisionSphere(_position, 10);
            CollisionBase.Parent = this;
            CollisionBase.addCollisionEvent(collisionEvent);

            if (ShipTeam == Team.Esxolus)
            {
                ((Sphere)CollisionBase.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = EsxolusShipGroup;
            }
            else
            {
                ((Sphere)CollisionBase.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = HalkShipGroup;
            }
        }
Example #10
0
        public Turret(long _uniqueId, Vector3 _position, Quaternion _rotation, String _modelFile, Vector3 _fireConeNormal, float _fireConeAngle, Battleship _parent)
            : base(_uniqueId, _position, _rotation, _modelFile)
        {
            Health = MAX_HEALTH;

            fireConeNormalVector = _fireConeNormal;
            fireConeNormalVector.Normalize(); // Just in case
            fireConeAngle = MathHelper.ToRadians(_fireConeAngle);

            parent = _parent;

            assignedPhase = nextAssignedPhase;
            switch (nextAssignedPhase)
            {
                case activationPhase.first: nextAssignedPhase = activationPhase.second; break;
                case activationPhase.second: nextAssignedPhase = activationPhase.third; break;
                case activationPhase.third: nextAssignedPhase = activationPhase.first; break;
            }

            MAX_SLERP = SLERP_SPEED;

            Rotation = AdjustRotationNoLimit(Vector3.Backward, fireConeNormalVector, Vector3.Up);

            fireTimer = FIRE_TIMER;

            detectionSphere = new CollisionSphere(_position, FIRE_RANGE);
            detectionSphere.Active = true;
        }
        public void ReadSphere(string objectId, Matrix4 transform, XmlNode node, PhysicsData physicsData)
        {
            Vector3 scaleDelta = transform.Scale - Vector3.UnitScale;

            if (scaleDelta.Length > PhysicsSerializer.ScaleEpsilon)
            {
                log.Error("Scale is not currently supported for sphere shapes");
            }
            float radius = 0;

            foreach (XmlNode childNode in node.ChildNodes)
            {
                switch (childNode.Name)
                {
                case "radius":
                    radius = float.Parse(childNode.InnerText);
                    break;

                default:
                    DebugMessage(childNode);
                    break;
                }
            }
            Vector3 center = unitConversion * transform.Translation;

            radius *= unitConversion;

            CollisionShape collisionShape = new CollisionSphere(center, radius);

            physicsData.AddCollisionShape(objectId, collisionShape);
        }
Example #12
0
        private void FourCollisionsButton_Click(object sender, EventArgs e)
        {
            CollisionAPI API = new CollisionAPI();
            // Create some obstacles, at 4 corners of a square
            List <CollisionShape> shapes = new List <CollisionShape>();

            CollisionSphere sphere = new CollisionSphere(new Vector3(0f, 0f, 2f), 1f);

            shapes.Add(sphere);
            API.AddCollisionShape(sphere, 1);

            CollisionCapsule capsule = new CollisionCapsule(new Vector3(10f, 0f, 0f),
                                                            new Vector3(10f, 0f, 4f),
                                                            1f);

            shapes.Add(capsule);
            API.AddCollisionShape(capsule, 2);

            // Now, an AABB
            CollisionAABB aabb = new CollisionAABB(new Vector3(9.5f, 9.5f, 0f),
                                                   new Vector3(10.5f, 10.5f, 4f));

            shapes.Add(aabb);
            API.AddCollisionShape(aabb, 3);

            CollisionOBB obb = new CollisionOBB(new Vector3(0f, 10f, 2),
                                                new Vector3[3] {
                new Vector3(1f, 0f, 0f),
                new Vector3(0f, 1f, 0f),
                new Vector3(0f, 0f, 1f)
            },
                                                new Vector3(1f, 1f, 1f));

            shapes.Add(obb);
            API.AddCollisionShape(obb, 4);

            FileStream   f      = new FileStream("C:\\Junk\\DumpSphereTree.txt", FileMode.Create, FileAccess.Write);
            StreamWriter writer = new StreamWriter(f);

            API.DumpSphereTree(writer);
            API.SphereTreeRoot.VerifySphereTree();

            // Now a moving object capsule in the center of the square
            CollisionCapsule moCap = new CollisionCapsule(new Vector3(5f, 5f, 0f),
                                                          new Vector3(5f, 5f, 4f),
                                                          1f);

            // Remember where the moving object started
            Vector3 start = moCap.center;

            // Move the moving object toward each of the obstacles
            foreach (CollisionShape s in shapes)
            {
                moCap.AddDisplacement(start - moCap.center);
                MoveToObject(writer, API, s, moCap);
            }

            writer.Close();
        }
        public void PointOutsideReturnsFalseTest(float x, float y, float z, float radius)
        {
            var shape = new CollisionSphere(Vector3.Zero, radius);

            var result = shape.IsWithin(new Vector3(x, y, z));

            result.Should().BeFalse();
        }
 public Vector3 SpherePosition(CollisionSphere sphere)
 {
     if (sphere.isFeet)
     {
         return(transform.position + sphere.offset * up);
     }
     return(transform.position + sphere.offset * up * heightScale);
 }
Example #15
0
        /// <summary>
        /// プロジェクターの位置を初期化
        /// </summary>
        /// <param name="target">注目する目標</param>
        public void Initialize(Vector3 target)
        {
            this.target = target;
            Vector3 position =
                (Matrix.CreateTranslation(baseDistance) *           //目標との相対位置へ移動
                 Matrix.CreateRotationY(0) *                        //回転角度を0
                 Matrix.CreateTranslation(target)).Translation;     //目標まで平行移動

            collision = new CollisionSphere(position, 2.0f);        //Collision更新
            UpdateLook();                                           //Viewマトリクス更新
        }
Example #16
0
    // Start is called before the first frame update
    void Start()
    {
        move = 0;

        rb   = GetComponent <Rigidbody2D>();
        coll = GetComponent <CollisionSphere>();
        anim = GetComponentInChildren <Animator>();

        playerLayer   = LayerMask.NameToLayer("Player");
        wallLayer     = LayerMask.NameToLayer("Wall");
        platformLayer = LayerMask.NameToLayer("Platform");
    }
        public DustParticleGenerator(Fighter _ship)
            : base()
        {
            ship = _ship;
            position = ship.Position;

            random = new Random((int)(System.DateTime.Now.Millisecond + position.X * 13 + position.Y * 7 + position.Z * 3));

            visibleParticles = new CollisionSphere(ship.Position, VISIBLE_RANGE);

            Initialize();
        }
Example #18
0
        private CollisionSphere collision; //Collision

        /// <summary>
        /// Default Settingで生成
        /// </summary>
        public Projector()
        {
            viewport = new Viewport(0, 0, Def.WindowDef.WINDOW_WIDTH, Def.WindowDef.WINDOW_HEIGHT);

            collision    = new CollisionSphere(new Vector3(0, 8, 10), 0.05f); //Collisions
            target       = new Vector3(0, 0, 0);                              //注目目標
            baseDistance = collision.Position;                                //注目目標との相対位置関係
            world        = Matrix.CreateWorld(Vector3.Zero, Vector3.Forward, Vector3.Up);
            projection   = Matrix.CreatePerspectiveFieldOfView(
                (float)(100 * Math.PI / 180),    //FOV
                viewport.AspectRatio,            //Aspect
                0.1f,                            //近い
                1000.0f);                        //遠い
            lookat = Matrix.CreateLookAt(collision.Position, target, Vector3.Up);
        }
Example #19
0
    // Use this for initialization
    void Start()
    {
        Player = GameObject.Find("Robot");
        if (!Player)
        {
            Debug.LogError("Could not find the Player GameObject (serched \"robot\")");
            Destroy(this);
        }

        PlayerAnim = Player.GetComponent <Animator>();
        if (!PlayerAnim)
        {
            Debug.LogError("Animator Component not found on Player");
            Destroy(this);
        }

        SlideParam = Animator.StringToHash("SlideCurve");
        rend       = Player.GetComponentInChildren <SkinnedMeshRenderer>();

        if (!rend)
        {
            Debug.LogError("Could not find SkinMeshRenderer component in Player children");
            Destroy(this);
        }
        playerMask = GetLayerMask((int)Enums.Layer.Obstacle);
        //import SphereCollider components into CollisionSphere objects
        SphereCollider[] colliders = Player.GetComponents <SphereCollider>();

        collisionSpheres = new CollisionSphere[colliders.Length];

        for (int i = 0; i < colliders.Length; i++)
        {
            collisionSpheres[i] = new CollisionSphere("Collider " + i, colliders[i].center, colliders[i].radius);
        }

        Array.Sort(collisionSpheres, new CollisionSphereComparer());

        feet = collisionSpheres[0];
        head = collisionSpheres[collisionSpheres.Length - 1];

        //poistion of collisionspheres mid slide

        collisionSphereSlidePositions    = new Vector3[4];
        collisionSphereSlidePositions[0] = new Vector3(0f, 0.2f, 0.75f);
        collisionSphereSlidePositions[1] = new Vector3(0f, 0.25f, 0.25f);
        collisionSphereSlidePositions[2] = new Vector3(0f, 0.55f, -0.15f);
        collisionSphereSlidePositions[3] = new Vector3(0.4f, 0.7f, -0.28f);
    }
Example #20
0
    // Use this for initialization
    void Start()
    {
        // Event Initialization
        OnObstacleCollision += ObstacleCollision;

        // Get Player reference
        Player = GameObject.Find("Robot");

        rend = Player.GetComponentInChildren <SkinnedMeshRenderer> ();
        if (!Player)
        {
            Debug.Log("Could not find Player");
            Destroy(this);
        }

        PlayerAnim = Player.GetComponent <Animator> ();
        if (!PlayerAnim)
        {
            Debug.LogError("Animator Component not found on Player!");
            Destroy(this);
        }

        SlideParam = Animator.StringToHash("SlideCurve");

        // Get layer mask for obstacle collision
        playerMask = GetLayerMask((int)Layer.Obstacle);

        // Import SphereCollider components into CollisionSphere objects
        SphereCollider[] colliders = Player.GetComponents <SphereCollider>();
        collisionSpheres = new CollisionSphere[colliders.Length];

        for (int i = 0; i < colliders.Length; i++)
        {
            collisionSpheres [i] = new CollisionSphere(colliders[i].center, colliders[i].radius);
        }

        Array.Sort(collisionSpheres, new CollisionSphereComparer());

        feet = collisionSpheres [0];
        head = collisionSpheres [collisionSpheres.Length - 1];

        // Positions of CollisionSpheres mid-slide
        collisionSphereSlidePositions     = new Vector3[4];
        collisionSphereSlidePositions [0] = new Vector3(0f, 0f, 0.75f);
        collisionSphereSlidePositions [1] = new Vector3(0f, 0.25f, 0.25f);
        collisionSphereSlidePositions [2] = new Vector3(0f, 0.55f, -0.15f);
        collisionSphereSlidePositions [3] = new Vector3(0.4f, 0.73f, 0.2f);
    }
Example #21
0
        /// <summary>
        /// Viewportと位置を指定できるコンストラクタ
        /// </summary>
        /// <param name="viewport">ビューポート</param>
        /// <param name="position">位置</param>
        public Projector(Viewport viewport, Vector3 position)
        {
            this.viewport = viewport;

            collision    = new CollisionSphere(position, 0.05f); //Collisions
            target       = new Vector3(0, 0, 0);                 //注目目標
            baseDistance = collision.Position;                   //注目目標との相対位置関係
            world        = Matrix.CreateWorld(Vector3.Zero, Vector3.Forward, Vector3.Up);
            //projection = Matrix.CreatePerspectiveFieldOfView(
            //    (float)(100 * Math.PI / 180),    //FOV
            //    viewport.AspectRatio,            //Aspect
            //    0.1f,                            //近い
            //    1000.0f);                        //遠い
            projection  = Matrix.CreateOrthographic(viewport.Width, viewport.Height, 0.1f, 1000.0f); //Orthographicに変更
            projection *= Matrix.CreateScale(1.5f);                                                  //拡大
            lookat      = Matrix.CreateLookAt(collision.Position, target, Vector3.Up);
        }
        public CollidableSpherePM(MyVector pos, float radius)
            : base(new PhysicalProperties(0.2f,0.3f,1))
        {
            m_boundingSphere = new CollisionSphere(radius);
            m_data.Position = pos;
            m_data.Acceleration = new MyVector(0, 0, 0);
            //m_data.AngularAcceleration = new MyVector(0, 0, 0);
            //m_data.AngularVelocity = new MyVector(0, 0, 0);
            m_data.Velocity = new MyVector(0, 0, 0);
            m_data.VelocityBody = new MyVector(0, 0, 0);
            m_data.Orientation = MyQuaternion.FromEulerAngles(0, 0, 0);
            m_data.Mass = radius * radius * radius;
            m_data.Forces = new MyVector(0, 0, 0);
            //m_data.Moments = new MyVector(0, 0, 0);

            //float moment = 0.4f * m_data.Mass * m_boundingSphere.Radius * m_boundingSphere.Radius;
            //m_data.Inertia = new MyMatrix(moment, 0, 0, 0, moment, 0, 0, 0, moment);
            //m_data.InertiaInverse = m_data.Inertia.Inverse;
        }
        public PilotingPlayerState(Player _player)
        {
            LogCat.updateValue("PlayerState", "Piloting");

            player = _player;
            playerShip = _player.PlayerShip;
            playerShip.DustGenerator.Active = true;

            leavingSphere = new CollisionSphere(Vector3.Zero, LEAVING_RADIUS);

            InputManager.bindMouse();

            player.PlayerHUDActive = true;

            bounceBackOffset = new Vector3(0, 15, -150);
            cameraPositionOffset = defaultOffset;
            cameraLookAt = defaultLookAt;

            setViewNoMove();
        }
Example #24
0
        /// <summary>
        /// Create and return a random shape object.
        /// </summary>
        private GameObject CreateRandomShape()
        {
            // tilemap actual size
            float tilemapActualSize = tilemapSize * tileSize;

            // collision shape and type
            ICollisionShape collisionShape = null;
            ShapeMeshes     shapeType      = ShapeMeshes.Cylinder;

            // random collision shape and type
            int randType = rand.Next(0, 2);

            switch (randType)
            {
            case 0:
                shapeType      = ShapeMeshes.SphereSmooth;
                collisionShape = new CollisionSphere();
                break;

            case 1:
                shapeType      = ShapeMeshes.Cube;
                collisionShape = new CollisionBox(2f, 2f, 2f);
                break;
            }

            // create shape
            float      sizeFactor    = 1.0f + (float)rand.NextDouble() * 1.25f;
            GameObject shape         = new GameObject();
            var        shapeRenderer = shape.AddComponent(new ShapeRenderer(shapeType)) as ShapeRenderer;

            shapeRenderer.MaterialOverride.DiffuseColor = new Color((rand.Next(0, 255)), (rand.Next(0, 255)), (rand.Next(0, 255)));
            var body = shape.AddComponent(new RigidBody(collisionShape, sizeFactor, 1f, 1f)) as RigidBody;

            body.Scale       = Vector3.One * tileSize * 0.25f * sizeFactor;
            body.Restitution = 0.5f;
            body.Position    = new Vector3(
                (float)rand.NextDouble() * tilemapActualSize,
                10f + (float)rand.NextDouble() * 45f,
                (float)rand.NextDouble() * tilemapActualSize);
            return(shape);
        }
        public Explosive(long _uniqueID, Vector3 _position, Quaternion _rotation, String _model)
            : base(_uniqueID, _position, _rotation, _model)
        {
            Damage = 45.0f;

            CollisionBase = new CollisionSphere(_position, BASE_SIZE);
            CollisionBase.Active = false;
            CollisionBase.Parent = this;
            CollisionBase.addCollisionEvent(collisionEvent);

            ((Sphere)CollisionBase.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = projectileGroup;

            explosionCollider = new CollisionSphere(_position, 3);
            explosionCollider.Active = false;
            explosionCollider.Parent = this;
            explosionCollider.addCollisionEvent(collisionEvent);

            ((Sphere)explosionCollider.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = projectileGroup;

            ttl = EXPLOSIVE_TTL;
        }
Example #26
0
        void Start()
        {
            var pos   = transform.position.ToVector3d();
            var scale = transform.localScale.y * 0.5;
            var rot   = transform.rotation.ToQuaternion();

            m_body                = new RigidBody();
            m_body.Position       = pos;
            m_body.Orientation    = rot;
            m_body.LinearDamping  = damping;
            m_body.AngularDamping = damping;
            m_body.SetMass(mass);
            m_body.SetAwake(true);
            m_body.SetCanSleep(true);

            var shape = new CollisionSphere(scale);

            shape.Body = m_body;

            RigidPhysicsEngine.Instance.Bodies.Add(m_body);
            RigidPhysicsEngine.Instance.Collisions.Primatives.Add(shape);
        }
    public void ColShapeEnterNotCalledWhenOutOfColShape()
    {
        var server    = new TestingServer();
        var behaviour = server.Instantiate <CollisionShapeBehaviour>();

        var collisionShape = new CollisionSphere(new Vector3(100, 100, 100), 10).AssociateWith(server);;
        var dummy          = new DummyElement().AssociateWith(server);

        var isEventCalled = false;

        collisionShape.ElementEntered += (element) =>
        {
            if (element == dummy)
            {
                isEventCalled = true;
            }
        };

        dummy.Position = new Vector3(0, 100, 100);

        isEventCalled.Should().BeFalse();
    }
    public void ColShapeEnterCalledOnceForTwoUpdatesInColshape()
    {
        var server    = new TestingServer();
        var behaviour = server.Instantiate <CollisionShapeBehaviour>();

        var collisionShape = new CollisionSphere(new Vector3(100, 100, 100), 10).AssociateWith(server);;
        var dummy          = new DummyElement().AssociateWith(server);

        int callCount = 0;

        collisionShape.ElementEntered += (element) =>
        {
            if (element == dummy)
            {
                callCount++;
            }
        };

        dummy.Position = new Vector3(95, 100, 100);
        dummy.Position = new Vector3(97.5f, 100, 100);

        callCount.Should().Be(1);
    }
Example #29
0
        protected override void _SimulationStep(float timestep)
        {
            for (int i = 0; i < this.colliders.Length; i++)
            {
                float radius = this.colliders[i].radius * Mathf.Max(Mathf.Max(this.colliders[i].transform.lossyScale.x, this.colliders[i].transform.lossyScale.y), this.colliders[i].transform.lossyScale.z);
                _colliders[i] = new CollisionSphere()
                {
                    center   = this.colliders[i].transform.TransformPoint(this.colliders[i].center),
                    radius   = radius,
                    radiusSq = radius * radius
                };
            }

            Job job = new Job()
            {
                colliders     = _colliders,
                vertices      = this.simulation.vertices,
                movability    = this.simulation.movability,
                colliderCount = _colliders.Length
            };

            this.simulation.jobHandle = job.Schedule(this.simulation.vertices.Length, 128, this.simulation.jobHandle);
        }
        public TurningAroundPlayerState(Player _player)
        {
            LogCat.updateValue("PlayerState", "TurningAround");

            player = _player;

            player.PlayerShip.CollisionBase.Active = true;

            player.PlayerHUDActive = true;

            alphaIn = true;
            alpha = 0.0f;

            reentrySphere = new CollisionSphere(Vector3.Zero, REENTRY_RADIUS);
            reentrySphere.Active = true;

            cameraPositionOffset = new Vector3(0, 15, -50);
            cameraLookAt = new Vector3(0, 0, 1000000);

            Texture2D graphic = ContentLoadManager.loadTexture("Textures/ReturningToBattleFieldMessage");
            returningGraphicPosition = new Vector2(400, 100);
            returningGraphicPosition.X -= graphic.Width / 2;
            returningGraphic = new AutoTexture2D(graphic, returningGraphicPosition);
        }
Example #31
0
        public int Compare(object a, object b)
        {
            if (!(a is CollisionSphere) || !(b is CollisionSphere))
            {
                Debug.LogError(Environment.StackTrace);
                throw new ArgumentException("Cannot compare CollisionSpheres to non-CollisionSpheres");
            }

            CollisionSphere lhs = (CollisionSphere)a;
            CollisionSphere rhs = (CollisionSphere)b;

            if (lhs.offset.y < rhs.offset.y)
            {
                return(-1);
            }
            else if (lhs.offset.y > rhs.offset.y)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
        public EsxolusCapitalShip(long _uniqueId, Vector3 _position, Quaternion _rotation)
            : base(_uniqueId, _position, _rotation, Team.Esxolus)
        {
            #region Camera Positions
            cameraPositions = new Vector3[]
                {
                    new Vector3(0, 50000, 0),
                    new Vector3(0, 1550, 3000), //375
                    new Vector3(0, -900, 12525), //3560
                    new Vector3(0, 2700, -375) //-750
                };

            cameraViews = new Vector3[]
                {
                    new Vector3(0, -1, 0),
                    new Vector3(0, 1550, 0),
                    new Vector3(0, -900, 9525),
                    new Vector3(0, 2700, -3375)
                };

            cameraUps = new Vector3[]
                {
                    new Vector3(0, 0, 1),
                    new Vector3(0, 1, 0),
                    new Vector3(0, 1, 0),
                    new Vector3(0, 1, 0)
                };
            #endregion

            screenModel = ContentLoadManager.loadModel("Models/Ships/esxolus_capital_ship_screen_model");

            #region ShipPositions & Spawns
            #region Assault Fighters
            assaultFighterPositions = new Vector3[]
                {
                    new Vector3(0, 1650, 0), // 125
                    new Vector3(-90, 1650, 125),
                    new Vector3(90, 1650, 125),

                    new Vector3(0, 1600, 125),
                    new Vector3(-90, 1600, 250),
                    new Vector3(90, 1600, 250),

                    new Vector3(0, 1700, 125),
                    new Vector3(-90, 1700, 250),
                    new Vector3(90, 1700, 250),
                };
            assaultFighterForward = Quaternion.CreateFromAxisAngle(Vector3.Backward, 0);

            for (int i = 0; i < INITIAL_ASSAULT_FIGHTERS; i++)
            {
                assaultFighterPositions[i] = Vector3.Transform(assaultFighterPositions[i], Rotation) + Position;
            }
            assaultFighterForward = Rotation * assaultFighterForward;
            #endregion

            #region Bombers
            bomberPositions = new Vector3[]
                {
                    new Vector3(0, 2800, -3375), // -3250
                    new Vector3(-90, 2800, -3250),
                    new Vector3(90, 2800, -3250),

                    new Vector3(0, 2750, -3250),
                    new Vector3(-90, 2750, -3125),
                    new Vector3(90, 2750, -3125),

                    new Vector3(0, 2850, -3250),
                    new Vector3(-90, 2850, -3125),
                    new Vector3(90, 2850, -3125),
                };
            bomberForward = Quaternion.CreateFromAxisAngle(Vector3.Backward, 0);

            for (int i = 0; i < INITIAL_BOMBERS; i++)
            {
                bomberPositions[i] = Vector3.Transform(bomberPositions[i], Rotation) + Position;
            }
            bomberForward = Rotation * bomberForward;
            #endregion

            #region Interceptors
            interceptorPositions = new Vector3[]
                {
                    new Vector3(0, -750, 9525), // 9650 // 9680
                    new Vector3(-90, -750, 9650),
                    new Vector3(90, -750, 9650),

                    new Vector3(0, -800, 9650),
                    new Vector3(-90, -800, 9775),
                    new Vector3(90, -800, 9775),

                    new Vector3(0, -700, 9650),
                    new Vector3(-90, -700, 9775),
                    new Vector3(90, -700, 9775),
                };
            interceptorForward = Quaternion.CreateFromAxisAngle(Vector3.Backward, 0);

            for (int i = 0; i < INITIAL_INTERCEPTORS; i++)
            {
                interceptorPositions[i] = Vector3.Transform(interceptorPositions[i], Rotation) + Position;
            }
            interceptorForward = Rotation * interceptorForward;
            #endregion
            #endregion

            #region Turrets
            // Forward Hull
            List<Turret> forwardHullTurrets = new List<Turret>();
            // Port Bow
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(817.5f, -298.5f, 12183.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.991f), MathHelper.ToRadians(15.35f), MathHelper.ToRadians(-9.461f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.991f), MathHelper.ToRadians(15.35f), MathHelper.ToRadians(-9.461f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(1463.7f, -407.7f, 12007.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.649f), MathHelper.ToRadians(16.136f), MathHelper.ToRadians(-9.527f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.649f), MathHelper.ToRadians(16.136f), MathHelper.ToRadians(-9.527f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2094f, -434.4f, 10430.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(68.154f), MathHelper.ToRadians(-1.754f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(68.154f), MathHelper.ToRadians(-1.754f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2723.7f, -461.7f, 8854.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.001f), MathHelper.ToRadians(68.154f), MathHelper.ToRadians(-1.754f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.001f), MathHelper.ToRadians(68.154f), MathHelper.ToRadians(-1.754f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3357.9f, -489.3f, 7267.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(68.154f), MathHelper.ToRadians(-1.754f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(68.154f), MathHelper.ToRadians(-1.754f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3980.4f, -515.7f, 5710.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(9.442f), MathHelper.ToRadians(68.194f), MathHelper.ToRadians(-2.376f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(9.442f), MathHelper.ToRadians(68.194f), MathHelper.ToRadians(-2.376f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3204f, -289.8f, 4371f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(174.095f), MathHelper.ToRadians(58.948f), MathHelper.ToRadians(163.57f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(174.095f), MathHelper.ToRadians(58.948f), MathHelper.ToRadians(163.57f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2419.5f, -45.3f, 2984.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.708f), MathHelper.ToRadians(83.308f), MathHelper.ToRadians(75.531f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.708f), MathHelper.ToRadians(83.308f), MathHelper.ToRadians(75.531f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(123.3f, 180f, 11388.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(50.286f), MathHelper.ToRadians(-83.61f), MathHelper.ToRadians(-87.058f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(50.286f), MathHelper.ToRadians(-83.61f), MathHelper.ToRadians(-87.058f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(90f, 828.3f, 5587.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(43.259f), MathHelper.ToRadians(-83.981f), MathHelper.ToRadians(-83.618f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(43.259f), MathHelper.ToRadians(-83.981f), MathHelper.ToRadians(-83.618f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(817.6f, -531.6f, 11968.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.859f), MathHelper.ToRadians(10.082f), MathHelper.ToRadians(-3.444f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.859f), MathHelper.ToRadians(10.082f), MathHelper.ToRadians(-3.444f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(1463.7f, -571.2f, 11872.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.155f), MathHelper.ToRadians(12.255f), MathHelper.ToRadians(-4.336f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.155f), MathHelper.ToRadians(12.255f), MathHelper.ToRadians(-4.336f))), 30, this));
            // Starboard Bow
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-817.5f, -298.5f, 12183.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.991f), MathHelper.ToRadians(-15.35f), MathHelper.ToRadians(9.461f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.991f), MathHelper.ToRadians(-15.35f), MathHelper.ToRadians(9.461f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-1463.7f, -407.7f, 12007.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.649f), MathHelper.ToRadians(-16.136f), MathHelper.ToRadians(9.527f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(3.649f), MathHelper.ToRadians(-16.136f), MathHelper.ToRadians(9.527f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2094f, -434.4f, 10430.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(-68.154f), MathHelper.ToRadians(1.754f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(-68.154f), MathHelper.ToRadians(1.754f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2723.7f, -461.7f, 8854.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.001f), MathHelper.ToRadians(-68.154f), MathHelper.ToRadians(1.754f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.001f), MathHelper.ToRadians(-68.154f), MathHelper.ToRadians(1.754f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3357.9f, -489.3f, 7267.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(-68.154f), MathHelper.ToRadians(1.754f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(10.01f), MathHelper.ToRadians(-68.154f), MathHelper.ToRadians(1.754f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3980.4f, -515.7f, 5710.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(9.442f), MathHelper.ToRadians(-68.194f), MathHelper.ToRadians(2.376f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(9.442f), MathHelper.ToRadians(-68.194f), MathHelper.ToRadians(2.376f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3204f, -289.8f, 4371f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(174.095f), MathHelper.ToRadians(-58.948f), MathHelper.ToRadians(-163.57f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(174.095f), MathHelper.ToRadians(-58.948f), MathHelper.ToRadians(-163.57f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2419.5f, -45.3f, 2984.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.708f), MathHelper.ToRadians(-83.308f), MathHelper.ToRadians(-75.531f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.708f), MathHelper.ToRadians(-83.308f), MathHelper.ToRadians(-75.531f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-123.3f, 180f, 11388.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(50.286f), MathHelper.ToRadians(83.61f), MathHelper.ToRadians(87.058f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(50.286f), MathHelper.ToRadians(83.61f), MathHelper.ToRadians(87.058f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-90f, 828.3f, 5587.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(43.259f), MathHelper.ToRadians(83.981f), MathHelper.ToRadians(83.618f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(43.259f), MathHelper.ToRadians(83.981f), MathHelper.ToRadians(83.618f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-817.6f, -531.6f, 11968.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.859f), MathHelper.ToRadians(-10.082f), MathHelper.ToRadians(3.444f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.859f), MathHelper.ToRadians(-10.082f), MathHelper.ToRadians(3.444f))), 30, this));
            forwardHullTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-1463.7f, -571.2f, 11872.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.155f), MathHelper.ToRadians(-12.255f), MathHelper.ToRadians(4.336f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(178.155f), MathHelper.ToRadians(-12.255f), MathHelper.ToRadians(4.336f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_forward_hull_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_forward_hull_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_forward_hull_c_model"),
                100, forwardHullTurrets, this));

            // Interceptor Hangar / Belly
            List<Turret> interceptorHangarTurrets = new List<Turret>();
            // Forward Hangar
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(0f, 406.5f, 10632.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(0f, -1105.5f, 10632.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            // Port Draft (Belly)
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(1503.6f, -737.1f, 10543.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(67.715f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(67.715f), MathHelper.ToRadians(0f))), 30, this));
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2390.1f, -869.7f, 8346f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(67.715f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(67.715f), MathHelper.ToRadians(0f))), 30, this));
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2642.1f, -986.7f, 6083.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(87.794f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(87.794f), MathHelper.ToRadians(0f))), 30, this));
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2736.9f, -1080.6f, 3857.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(87.794f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(87.794f), MathHelper.ToRadians(0f))), 30, this));
            // Starboard Draft (Belly)
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-1503.6f, -737.1f, 10543.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-67.715f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-67.715f), MathHelper.ToRadians(0f))), 30, this));
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2390.1f, -869.7f, 8346f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-67.715f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-67.715f), MathHelper.ToRadians(0f))), 30, this));
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2642.1f, -986.7f, 6083.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-87.794f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-87.794f), MathHelper.ToRadians(0f))), 30, this));
            interceptorHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2736.9f, -1080.6f, 3857.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-87.794f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-87.794f), MathHelper.ToRadians(0f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_bow_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_bow_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_bow_c_model"),
                100, interceptorHangarTurrets, this));

            // Port Quarter
            List<Turret> portQuarterTurrets = new List<Turret>();
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(4497.6f, 585f, -1591.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.263f), MathHelper.ToRadians(46.646f), MathHelper.ToRadians(5.362f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.263f), MathHelper.ToRadians(46.646f), MathHelper.ToRadians(5.362f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(5898.6f, 713.7f, -3147.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.281f), MathHelper.ToRadians(47.41f), MathHelper.ToRadians(5.387f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.281f), MathHelper.ToRadians(47.41f), MathHelper.ToRadians(5.387f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6151.5f, 660f, -3358.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(29.81f), MathHelper.ToRadians(-26.742f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(29.81f), MathHelper.ToRadians(-26.742f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3079.2f, 480f, -7161.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.703f), MathHelper.ToRadians(16.23f), MathHelper.ToRadians(-16.05f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.703f), MathHelper.ToRadians(16.23f), MathHelper.ToRadians(-16.05f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(8594.1f, -526.5f, -4801.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(29.81f), MathHelper.ToRadians(-26.742f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(29.81f), MathHelper.ToRadians(-26.742f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(4908.9f, -18.9f, -7711.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.79f), MathHelper.ToRadians(17.494f), MathHelper.ToRadians(-16.349f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.79f), MathHelper.ToRadians(17.494f), MathHelper.ToRadians(-16.349f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(8664.6f, -653.7f, -4841.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(8664.6f, -1088.7f, -4841.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(5008.2f, -151.2f, -7790.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(5008.2f, -1578.6f, -7790.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(140.988f), MathHelper.ToRadians(0f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(8596.5f, -1213.8f, -4802.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.557f), MathHelper.ToRadians(27.369f), MathHelper.ToRadians(28.643f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.557f), MathHelper.ToRadians(27.369f), MathHelper.ToRadians(28.643f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(4908.9f, -1711.8f, -7711.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.704f), MathHelper.ToRadians(13.778f), MathHelper.ToRadians(5.479f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.704f), MathHelper.ToRadians(13.778f), MathHelper.ToRadians(5.479f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6152.1f, -2561.4f, -3359.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.172f), MathHelper.ToRadians(31.081f), MathHelper.ToRadians(29.938f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.172f), MathHelper.ToRadians(31.081f), MathHelper.ToRadians(29.938f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3079.5f, -1912.2f, -7162.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.36f), MathHelper.ToRadians(15.166f), MathHelper.ToRadians(6.093f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.36f), MathHelper.ToRadians(15.166f), MathHelper.ToRadians(6.093f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(4497.6f, -2439.6f, -1591.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.783f), MathHelper.ToRadians(46.627f), MathHelper.ToRadians(-6.896f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.783f), MathHelper.ToRadians(46.627f), MathHelper.ToRadians(-6.896f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(5899.2f, -2605.5f, -3147.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(185.791f), MathHelper.ToRadians(47.948f), MathHelper.ToRadians(-2.266f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(185.791f), MathHelper.ToRadians(47.948f), MathHelper.ToRadians(-2.266f))), 30, this));
            portQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2678.4f, -1914f, -7042.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-176.884f), MathHelper.ToRadians(1.106f), MathHelper.ToRadians(-2.349f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-176.884f), MathHelper.ToRadians(1.106f), MathHelper.ToRadians(-2.349f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
               ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_quarter_model"),
               ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_quarter_d_model"),
               ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_quarter_c_model"),
               100, portQuarterTurrets, this));

            // Starboard Quarter
            List<Turret> starboardQuarterTurrets = new List<Turret>();
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-4497.6f, 585f, -1591.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.263f), MathHelper.ToRadians(-46.646f), MathHelper.ToRadians(-5.362f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.263f), MathHelper.ToRadians(-46.646f), MathHelper.ToRadians(-5.362f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-5898.6f, 713.7f, -3147.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.281f), MathHelper.ToRadians(-47.41f), MathHelper.ToRadians(-5.387f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.281f), MathHelper.ToRadians(-47.41f), MathHelper.ToRadians(-5.387f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6151.5f, 660f, -3358.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(-29.81f), MathHelper.ToRadians(26.742f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(-29.81f), MathHelper.ToRadians(26.742f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3079.2f, 480f, -7161.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.703f), MathHelper.ToRadians(-16.23f), MathHelper.ToRadians(16.05f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.703f), MathHelper.ToRadians(-16.23f), MathHelper.ToRadians(16.05f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-8594.1f, -526.5f, -4801.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(-29.81f), MathHelper.ToRadians(26.742f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.517f), MathHelper.ToRadians(-29.81f), MathHelper.ToRadians(26.742f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-4908.9f, -18.9f, -7711.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.79f), MathHelper.ToRadians(-17.494f), MathHelper.ToRadians(16.349f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-12.79f), MathHelper.ToRadians(-17.494f), MathHelper.ToRadians(16.349f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-8664.6f, -653.7f, -4841.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-8664.6f, -1088.7f, -4841.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-5008.2f, -151.2f, -7790.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-5008.2f, -1578.6f, -7790.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(-140.988f), MathHelper.ToRadians(0f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-8596.5f, -1213.8f, -4802.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.557f), MathHelper.ToRadians(-27.369f), MathHelper.ToRadians(-28.643f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.557f), MathHelper.ToRadians(-27.369f), MathHelper.ToRadians(-28.643f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-4908.9f, -1711.8f, -7711.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.704f), MathHelper.ToRadians(-13.778f), MathHelper.ToRadians(-5.479f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.704f), MathHelper.ToRadians(-13.778f), MathHelper.ToRadians(-5.479f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6152.1f, -2561.4f, -3359.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.172f), MathHelper.ToRadians(-31.081f), MathHelper.ToRadians(-29.938f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.172f), MathHelper.ToRadians(-31.081f), MathHelper.ToRadians(-29.938f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3079.5f, -1912.2f, -7162.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.36f), MathHelper.ToRadians(-15.166f), MathHelper.ToRadians(-6.093f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-167.36f), MathHelper.ToRadians(-15.166f), MathHelper.ToRadians(-6.093f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-4497.6f, -2439.6f, -1591.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.783f), MathHelper.ToRadians(-46.627f), MathHelper.ToRadians(6.896f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.783f), MathHelper.ToRadians(-46.627f), MathHelper.ToRadians(6.896f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-5899.2f, -2605.5f, -3147.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(185.791f), MathHelper.ToRadians(-47.948f), MathHelper.ToRadians(2.266f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(185.791f), MathHelper.ToRadians(-47.948f), MathHelper.ToRadians(2.266f))), 30, this));
            starboardQuarterTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2678.4f, -1914f, -7042.8f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-176.884f), MathHelper.ToRadians(-1.106f), MathHelper.ToRadians(2.349f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-176.884f), MathHelper.ToRadians(-1.106f), MathHelper.ToRadians(2.349f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_quarter_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_quarter_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_quarter_c_model"),
                100, starboardQuarterTurrets, this));

            //Port Overwing
            List<Turret> portOverwingTurrets = new List<Turret>();
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3280.8f, -607.8f, 2982.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.123f), MathHelper.ToRadians(36.659f), MathHelper.ToRadians(-6.617f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.123f), MathHelper.ToRadians(36.659f), MathHelper.ToRadians(-6.617f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(4729.5f, -772.5f, 1941.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.12f), MathHelper.ToRadians(36.598f), MathHelper.ToRadians(-6.623f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.12f), MathHelper.ToRadians(36.598f), MathHelper.ToRadians(-6.623f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6282f, -950.7f, 856.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.141f), MathHelper.ToRadians(36.997f), MathHelper.ToRadians(-6.587f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.141f), MathHelper.ToRadians(36.997f), MathHelper.ToRadians(-6.587f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(7803f, -1124.1f, -224.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(20.982f), MathHelper.ToRadians(80.386f), MathHelper.ToRadians(11.432f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(20.982f), MathHelper.ToRadians(80.386f), MathHelper.ToRadians(11.432f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(7871.4f, -1115.7f, -591.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(16.251f), MathHelper.ToRadians(80.485f), MathHelper.ToRadians(6.866f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(16.251f), MathHelper.ToRadians(80.485f), MathHelper.ToRadians(6.866f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(7017.9f, -930f, -1676.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(51.139f), MathHelper.ToRadians(167.552f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(51.139f), MathHelper.ToRadians(167.552f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6179.4f, -747f, -2741.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(51.139f), MathHelper.ToRadians(167.552f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(51.139f), MathHelper.ToRadians(167.552f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6223.5f, -1317.3f, 834.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-175.88f), MathHelper.ToRadians(36.997f), MathHelper.ToRadians(-6.587f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-175.88f), MathHelper.ToRadians(36.997f), MathHelper.ToRadians(-6.587f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(7741.5f, -1492.4f, -246.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-159.136f), MathHelper.ToRadians(80.397f), MathHelper.ToRadians(11.405f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-159.136f), MathHelper.ToRadians(80.397f), MathHelper.ToRadians(11.405f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(7810.5f, -1485.9f, -608.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-168.439f), MathHelper.ToRadians(80.63f), MathHelper.ToRadians(3.309f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-168.439f), MathHelper.ToRadians(80.63f), MathHelper.ToRadians(3.309f))), 30, this));
            portOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6963.3f, -1333.2f, -1703.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-2.308f), MathHelper.ToRadians(51.277f), MathHelper.ToRadians(169.65f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-2.308f), MathHelper.ToRadians(51.277f), MathHelper.ToRadians(169.65f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_overwing_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_overwing_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_overwing_c_model"),
                100, portOverwingTurrets, this));

            // Starboard Overwing
            List<Turret> starboardOverwingTurrets = new List<Turret>();
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3280.8f, -607.8f, 2982.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.123f), MathHelper.ToRadians(-36.659f), MathHelper.ToRadians(6.617f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.123f), MathHelper.ToRadians(-36.659f), MathHelper.ToRadians(6.617f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-4729.5f, -772.5f, 1941.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.12f), MathHelper.ToRadians(-36.598f), MathHelper.ToRadians(6.623f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.12f), MathHelper.ToRadians(-36.598f), MathHelper.ToRadians(6.623f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6282f, -950.7f, 856.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.141f), MathHelper.ToRadians(-36.997f), MathHelper.ToRadians(6.587f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(4.141f), MathHelper.ToRadians(-36.997f), MathHelper.ToRadians(6.587f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-7803f, -1124.1f, -224.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(20.982f), MathHelper.ToRadians(-80.386f), MathHelper.ToRadians(-11.432f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(20.982f), MathHelper.ToRadians(-80.386f), MathHelper.ToRadians(-11.432f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-7871.4f, -1115.7f, -591.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(16.251f), MathHelper.ToRadians(-80.485f), MathHelper.ToRadians(-6.866f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(16.251f), MathHelper.ToRadians(-80.485f), MathHelper.ToRadians(-6.866f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-7017.9f, -930f, -1676.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(-51.139f), MathHelper.ToRadians(-167.552f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(-51.139f), MathHelper.ToRadians(-167.552f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6179.4f, -747f, -2741.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(-51.139f), MathHelper.ToRadians(-167.552f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(176.07f), MathHelper.ToRadians(-51.139f), MathHelper.ToRadians(-167.552f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6223.5f, -1317.3f, 834.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-175.88f), MathHelper.ToRadians(-36.997f), MathHelper.ToRadians(6.587f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-175.88f), MathHelper.ToRadians(-36.997f), MathHelper.ToRadians(6.587f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-7741.5f, -1492.4f, -246.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-159.136f), MathHelper.ToRadians(-80.397f), MathHelper.ToRadians(-11.405f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-159.136f), MathHelper.ToRadians(-80.397f), MathHelper.ToRadians(-11.405f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-7810.5f, -1485.9f, -608.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-168.439f), MathHelper.ToRadians(-80.63f), MathHelper.ToRadians(-3.309f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-168.439f), MathHelper.ToRadians(-80.63f), MathHelper.ToRadians(-3.309f))), 30, this));
            starboardOverwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6963.3f, -1333.2f, -1703.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-2.308f), MathHelper.ToRadians(-51.277f), MathHelper.ToRadians(-169.65f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-2.308f), MathHelper.ToRadians(-51.277f), MathHelper.ToRadians(-169.65f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_overwing_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_overwing_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_overwing_c_model"),
                100, starboardOverwingTurrets, this));

            // Port Underwing
            List<Turret> portUnderwingTurrets = new List<Turret>();
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3462.3f, -1228.5f, 10.277f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.959f), MathHelper.ToRadians(14.678f), MathHelper.ToRadians(-19.962f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.959f), MathHelper.ToRadians(14.678f), MathHelper.ToRadians(-19.962f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(5040.9f, -1801.5f, 2637f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.945f), MathHelper.ToRadians(14.678f), MathHelper.ToRadians(-19.962f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.945f), MathHelper.ToRadians(14.678f), MathHelper.ToRadians(-19.962f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6615.3f, -2371.8f, 2187.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(13.878f), MathHelper.ToRadians(63.639f), MathHelper.ToRadians(-9.28f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(13.878f), MathHelper.ToRadians(63.639f), MathHelper.ToRadians(-9.28f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6795f, -2399.1f, 1842.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(12.216f), MathHelper.ToRadians(63.146f), MathHelper.ToRadians(-9.549f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(12.216f), MathHelper.ToRadians(63.146f), MathHelper.ToRadians(-9.549f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6389.7f, -2091f, 350.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(160.64f), MathHelper.ToRadians(72.506f), MathHelper.ToRadians(141.147f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(160.64f), MathHelper.ToRadians(72.506f), MathHelper.ToRadians(141.147f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(5870.4f, -2082.9f, -1010.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-16.234f), MathHelper.ToRadians(73.605f), MathHelper.ToRadians(144.224f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-16.234f), MathHelper.ToRadians(73.605f), MathHelper.ToRadians(144.224f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6141.3f, -2261.7f, -57.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.077f), MathHelper.ToRadians(73.123f), MathHelper.ToRadians(144.858f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.077f), MathHelper.ToRadians(73.123f), MathHelper.ToRadians(144.858f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6417.3f, -2444.4f, 903.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-13.738f), MathHelper.ToRadians(70.132f), MathHelper.ToRadians(146.713f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-13.738f), MathHelper.ToRadians(70.132f), MathHelper.ToRadians(146.713f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6677.7f, -2615.1f, 1803f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-169.907f), MathHelper.ToRadians(64.454f), MathHelper.ToRadians(-11.1f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-169.907f), MathHelper.ToRadians(64.454f), MathHelper.ToRadians(-11.1f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(6497.7f, -2587.2f, 2145.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.783f), MathHelper.ToRadians(63.1f), MathHelper.ToRadians(-8.888f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.783f), MathHelper.ToRadians(63.1f), MathHelper.ToRadians(-8.888f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(5672.4f, -2295.3f, 2366.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.826f), MathHelper.ToRadians(14.715f), MathHelper.ToRadians(-19.368f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.826f), MathHelper.ToRadians(14.715f), MathHelper.ToRadians(-19.368f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(4719f, -1959f, 2631.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(14.715f), MathHelper.ToRadians(-19.368f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(14.715f), MathHelper.ToRadians(-19.368f))), 30, this));
            portUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(3771.3f, -1624.5f, 2895.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(14.715f), MathHelper.ToRadians(-19.368f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(14.715f), MathHelper.ToRadians(-19.368f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_underwing_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_underwing_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_underwing_c_model"),
                100, portUnderwingTurrets, this));

            // Starboard Underwing
            List<Turret> starboardUnderwingTurrets = new List<Turret>();
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3462.3f, -1228.5f, 10.277f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.959f), MathHelper.ToRadians(-14.678f), MathHelper.ToRadians(19.962f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.959f), MathHelper.ToRadians(-14.678f), MathHelper.ToRadians(19.962f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-5040.9f, -1801.5f, 2637f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.945f), MathHelper.ToRadians(-14.678f), MathHelper.ToRadians(19.962f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(8.945f), MathHelper.ToRadians(-14.678f), MathHelper.ToRadians(19.962f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6615.3f, -2371.8f, 2187.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(13.878f), MathHelper.ToRadians(-63.639f), MathHelper.ToRadians(9.28f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(13.878f), MathHelper.ToRadians(-63.639f), MathHelper.ToRadians(9.28f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6795f, -2399.1f, 1842.6f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(12.216f), MathHelper.ToRadians(-63.146f), MathHelper.ToRadians(9.549f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(12.216f), MathHelper.ToRadians(-63.146f), MathHelper.ToRadians(9.549f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6389.7f, -2091f, 350.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(160.64f), MathHelper.ToRadians(-72.506f), MathHelper.ToRadians(-141.147f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(160.64f), MathHelper.ToRadians(-72.506f), MathHelper.ToRadians(-141.147f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-5870.4f, -2082.9f, -1010.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-16.234f), MathHelper.ToRadians(-73.605f), MathHelper.ToRadians(-144.224f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-16.234f), MathHelper.ToRadians(-73.605f), MathHelper.ToRadians(-144.224f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6141.3f, -2261.7f, -57.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.077f), MathHelper.ToRadians(-73.123f), MathHelper.ToRadians(-144.858f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-15.077f), MathHelper.ToRadians(-73.123f), MathHelper.ToRadians(-144.858f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6417.3f, -2444.4f, 903.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-13.738f), MathHelper.ToRadians(-70.132f), MathHelper.ToRadians(-146.713f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-13.738f), MathHelper.ToRadians(-70.132f), MathHelper.ToRadians(-146.713f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6677.7f, -2615.1f, 1803f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-169.907f), MathHelper.ToRadians(-64.454f), MathHelper.ToRadians(11.1f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-169.907f), MathHelper.ToRadians(-64.454f), MathHelper.ToRadians(11.1f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-6497.7f, -2587.2f, 2145.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.783f), MathHelper.ToRadians(-63.1f), MathHelper.ToRadians(8.888f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.783f), MathHelper.ToRadians(-63.1f), MathHelper.ToRadians(8.888f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-5672.4f, -2295.3f, 2366.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.826f), MathHelper.ToRadians(-14.715f), MathHelper.ToRadians(19.368f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.826f), MathHelper.ToRadians(-14.715f), MathHelper.ToRadians(19.368f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-4719f, -1959f, 2631.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(-14.715f), MathHelper.ToRadians(19.368f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(-14.715f), MathHelper.ToRadians(19.368f))), 30, this));
            starboardUnderwingTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-3771.3f, -1624.5f, 2895.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(-14.715f), MathHelper.ToRadians(19.368f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-171.743f), MathHelper.ToRadians(-14.715f), MathHelper.ToRadians(19.368f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_underwing_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_underwing_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_underwing_c_model"),
                100, starboardUnderwingTurrets, this));

            // Stern
            List<Turret> sternTurrets = new List<Turret>();
            // Port Stern
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2546.1f, 546.9f, -7326.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(166.727f), MathHelper.ToRadians(72.767f), MathHelper.ToRadians(167.051f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(166.727f), MathHelper.ToRadians(72.767f), MathHelper.ToRadians(167.051f))), 30, this));
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(2114.4f, 561f, -8949.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.081f), MathHelper.ToRadians(73.308f), MathHelper.ToRadians(179.06f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.081f), MathHelper.ToRadians(73.308f), MathHelper.ToRadians(179.06f))), 30, this));
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(1764.3f, 571.2f, -10291.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.638f), MathHelper.ToRadians(72.027f), MathHelper.ToRadians(178.478f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.638f), MathHelper.ToRadians(72.027f), MathHelper.ToRadians(178.478f))), 30, this));
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(1518.9f, 578.4f, -11318.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(179.985f), MathHelper.ToRadians(73.417f), MathHelper.ToRadians(177.891f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(179.985f), MathHelper.ToRadians(73.417f), MathHelper.ToRadians(177.891f))), 30, this));
            // Starboard Stern
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2546.1f, 546.9f, -7326.9f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(166.727f), MathHelper.ToRadians(-72.767f), MathHelper.ToRadians(-167.051f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(166.727f), MathHelper.ToRadians(-72.767f), MathHelper.ToRadians(-167.051f))), 30, this));
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-2114.4f, 561f, -8949.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.081f), MathHelper.ToRadians(-73.308f), MathHelper.ToRadians(-179.06f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.081f), MathHelper.ToRadians(-73.308f), MathHelper.ToRadians(-179.06f))), 30, this));
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-1764.3f, 571.2f, -10291.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.638f), MathHelper.ToRadians(-72.027f), MathHelper.ToRadians(-178.478f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.638f), MathHelper.ToRadians(-72.027f), MathHelper.ToRadians(-178.478f))), 30, this));
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-1518.9f, 578.4f, -11318.4f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(179.985f), MathHelper.ToRadians(-73.417f), MathHelper.ToRadians(-177.891f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(179.985f), MathHelper.ToRadians(-73.417f), MathHelper.ToRadians(-177.891f))), 30, this));
            // Rudder
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(284.4f, -2198.7f, -9577.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.521f), MathHelper.ToRadians(13.292f), MathHelper.ToRadians(79.351f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.521f), MathHelper.ToRadians(13.292f), MathHelper.ToRadians(79.351f))), 30, this));
            sternTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-284.4f, -2198.7f, -9577.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.521f), MathHelper.ToRadians(-13.292f), MathHelper.ToRadians(-79.351f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-166.521f), MathHelper.ToRadians(-13.292f), MathHelper.ToRadians(-79.351f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_stern_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_stern_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_stern_c_model"),
                100, sternTurrets, this));

            // Assault Fighter Hangar
            List<Turret> assaultFighterHangarTurrets = new List<Turret>();
            assaultFighterHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(730.8f, 1742.7f, 1120.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            assaultFighterHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(730.8f, 1495.8f, 1019.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            assaultFighterHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-730.8f, 1742.7f, 1120.5f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            assaultFighterHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-730.8f, 1495.8f, 1019.1f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_af_hangar_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_af_hangar_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_af_hangar_c_model"),
                100, assaultFighterHangarTurrets, this));

            // Bomber Hangar
            List<Turret> bomberHangarTurrets = new List<Turret>();
            bomberHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(730.8f, 2882.1f, -2280f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            bomberHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(730.8f, 2664f, -2300.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            bomberHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-730.8f, 2882.1f, -2280f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            bomberHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-730.8f, 2664f, -2300.7f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_b_hangar_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_b_hangar_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_b_hangar_c_model"),
                100, bomberHangarTurrets, this));

            // Support Hangar
            List<Turret> supportHangarTurrets = new List<Turret>();
            supportHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(730.8f, -3131.1f, 33.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            supportHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(730.8f, -3400.8f, 124.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            supportHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-730.8f, -3131.1f, 33.3f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            supportHangarTurrets.Add(SceneObjectFactory.createEsxolusTurret(Position + Vector3.Transform(new Vector3(-730.8f, -3400.8f, 124.2f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_support_hangar_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_support_hangar_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_support_hangar_c_model"),
                100, supportHangarTurrets, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_inner_engine_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_inner_engine_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_inner_engine_c_model"),
                100, new List<Turret>(), this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_outer_engine_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_outer_engine_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_port_outer_engine_c_model"),
                100, new List<Turret>(), this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_inner_engine_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_inner_engine_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_inner_engine_c_model"),
                100, new List<Turret>(), this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_outer_engine_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_outer_engine_d_model"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/e_starboard_outer_engine_c_model"),
                100, new List<Turret>(), this));
            #endregion

            // Center positions of the pieces, mostly for drawing recticles
            shipPiecePositions = new Vector3[]
            {
                // 0  Bow/Int Hanger
                new Vector3(0.0f, -1655.7f, 5876.7f),
                // 1  Forward Hull
                new Vector3(0.0f, -15.0f, 6443.7f),
                // 2  Assault Hanger
                new Vector3(0.0f, 1353.0f, -514.2f),
                // 3  Bomber Hanger
                new Vector3(0.0f, 2005.5f, -4249.5f),
                // 4  Port Quarter
                new Vector3(4689.0f, -952.5f, -2427.3f),

                // 5  Port Overwing
                new Vector3(5253.6f, -920.7f, -481.2f),
                // 6  Port Underwing
                new Vector3(4725.0f, -1626.9f, -652.5f),
                // 7  Starboard Quarter
                new Vector3(-4689.0f, -952.5f, -2427.3f),
                // 8  Starboard Overwing
                new Vector3(-5253.6f, -920.7f, -481.2f),
                // 9  Starboard Underwing
                new Vector3(-4725.0f, -1626.9f, -625.5f),

                // 10  Stern
                new Vector3(0.0f, -7.45f, -8273.4f),
                // 11  Port Inner Engine
                new Vector3(1359.3f, -827.1f, -9384.9f),
                // 12  Port Outer Engine
                new Vector3(3678.0f, -727.5f, -8560.2f),
                // 13  Starboard Inner Engine
                new Vector3(-1359.3f, -827.1f, -9384.9f),
                // 14  Starboard Outer Engine
                new Vector3(-3678.0f, -727.1f, -8560.2f),

                // 15  Support Hangar
                new Vector3(0.0f, -1779.9f, -1830.9f),
            };

            Initialize();

            setModelByString("Models/box");
            setCloseModelByString("Models/box");
            // collisionMesh = ContentLoadManager.loadModel("Models/Ships/esxolus_capital_ship_collision_model");

            radiusSphere = new CollisionSphere(Position, Model);

            /*collisionBase = new CollisionMesh(collisionMesh, Position, Rotation);
            collisionBase.setActive(true);
            collisionBase.addCollisionEvent(collisionEvent);
            collisionBase.setParent(this);*/
        }
 public Vector3 SpherePosition(CollisionSphere sphere)
 {
     if (sphere.isFeet)
         return transform.position + sphere.offset * up;
     else
         return transform.position + sphere.offset * up * heightScale;
 }
Example #34
0
        public bool IntersectSphere(out MyVector intersectionPoint, out MyVector intersectionNormal,
            out float collisionTime, MyVector startPoint, MyVector endPoint, float dt, CollisionSphere sphere)
        {
            intersectionPoint = new MyVector();
            intersectionNormal = new MyVector();
            collisionTime = 0;
            MyVector rVelocity = (endPoint - startPoint) / dt;
            MyVector translate = (endPoint - startPoint);

            int nPoints = 0;
            //bool status = false;
            MyVector iPoint;
            MyVector n1, n2, n3;
            MyVector sPoint;
            MyVector ePoint;
            float dist, speed, d1, d2, d3;

            // check for face collision
            for (int i = 0; i < m_faces.Length; i++)
            {

                sPoint = startPoint - m_faces[i].n * sphere.Radius;
                ePoint = endPoint - m_faces[i].n * sphere.Radius;

                if ((ePoint - m_vertices[m_faces[i].v1]) * m_faces[i].n > 0)
                {
                    //the line doesn't cross the triangle
                    continue;
                }
                dist = m_faces[i].n * (sPoint - m_vertices[m_faces[i].v1]);
                speed = -dist / (m_faces[i].n * rVelocity);

                if (speed < 0)
                {
                    if (translate * (m_faces[i].n)<0)
                    {
                        if (dist < -0.5f)
                            continue;
                    }
                    else
                        continue;
                }
                if (nPoints > 0 && speed > collisionTime)
                    continue;
                iPoint = sPoint + speed * rVelocity;

                //3 planes around triangle
                //plane1
                n1 = ((m_vertices[m_faces[i].v2] - m_vertices[m_faces[i].v1]) ^ m_faces[i].n).Normalize();
                d1 = n1 * (m_vertices[m_faces[i].v1]);

                //plane2
                n2 = ((m_vertices[m_faces[i].v3] - m_vertices[m_faces[i].v2]) ^ m_faces[i].n).Normalize();
                d2 = n2 * (m_vertices[m_faces[i].v2]);

                //plane3
                n3 = ((m_vertices[m_faces[i].v1] - m_vertices[m_faces[i].v3]) ^ m_faces[i].n).Normalize();
                d3 = n3 * (m_vertices[m_faces[i].v3]);

                float x1 = n1 * iPoint - d1;
                float x2 = n2 * iPoint - d2;
                float x3 = n3 * iPoint - d3;
                if (x1 <= 0 && x2 <= 0 && x3 <= 0)
                {
                    //if (status == false)
                    //{
                    //    status = true;
                    //    intersectionPoint = iPoint;
                    //    intersectionNormal = m_faces[i].n;
                    //    collisionTime = speed;
                    //}
                    //else if (speed < collisionTime)
                    //{
                    //    intersectionPoint = iPoint;
                    //    intersectionNormal = m_faces[i].n;
                    //    collisionTime = speed;
                    //}
                    if (nPoints == 0)
                    {
                        nPoints = 1;

                        intersectionPoint = iPoint;
                        intersectionNormal = m_faces[i].n;
                        collisionTime = speed;
                    }
                    else if (speed < collisionTime)
                    {
                        nPoints = 1;

                        intersectionPoint = iPoint;
                        intersectionNormal = m_faces[i].n;
                        collisionTime = speed;
                    }
                    else if (speed == collisionTime && nPoints > 0)
                    {
                        nPoints++;
                        intersectionPoint.Add(iPoint);
                        intersectionNormal.Add(m_faces[i].n);
                    }
                }

            }
            //if (nPoints > 1)
            //{
            //    intersectionPoint.Divide(nPoints);
            //    intersectionNormal.Divide(nPoints);
            //}

            //if (status == true)
            //{
            //    return true;
            //}

            //status = false;

            // no face collision
            //check for edge collision

            foreach (CEdge e in m_edges)
            {
                MyVector DV, DVP;
                DV = m_vertices[e.v2] - m_vertices[e.v1];
                DVP = m_vertices[e.v1] - startPoint;
                double a = (double)DV.LengthSq * (double)rVelocity.LengthSq - (double)(DV * rVelocity) * (double)(DV * rVelocity);
                double b = -2 * (double)((double)DV.LengthSq * (double)(DVP * rVelocity) - (double)(DVP * DV) * (double)(rVelocity * DV));
                double c = (double)DV.LengthSq * (double)DVP.LengthSq - (double)(DV * DVP) * (double)(DV * DVP) - (double)(sphere.Radius * sphere.Radius) * (double)DV.LengthSq;
                double delta = b * b - 4 * a * c;
                if (delta >= 0)
                {

                    double t;
                    if (a > 0)
                    {
                        t = (-b - Math.Sqrt(delta)) / (2 * a);
                    }
                    else
                    {
                        t = (-b + Math.Sqrt(delta)) / (2 * a);
                    }
                    if (t < -0.04)
                        continue;
                    if (nPoints > 0 && t > collisionTime)
                        continue;

                    iPoint = startPoint + (float)t * rVelocity;
                    iPoint.Add((DV ^ (DVP ^ DV)).Normalize() * sphere.Radius);
                    if ((iPoint - m_vertices[e.v1]) * DV >= 0 && (iPoint - m_vertices[e.v2]) * DV <= 0)
                    {

                        //intersectionPoint = iPoint;
                        //intersectionNormal = startPoint - intersectionPoint;
                        //intersectionNormal.Normalize();

                        //status = true;
                        //collisionTime = t;
                        if (nPoints == 0)
                        {
                            nPoints = 1;

                            intersectionPoint = iPoint;
                            intersectionNormal = startPoint - intersectionPoint;
                            intersectionNormal.Normalize();
                            collisionTime = (float)t;
                        }
                        else if (t < collisionTime)
                        {
                            nPoints = 1;

                            intersectionPoint = iPoint;
                            intersectionNormal = startPoint - intersectionPoint;
                            intersectionNormal.Normalize();
                            collisionTime = (float)t;
                        }
                        else if (t == collisionTime && nPoints > 0)
                        {
                            nPoints++;
                            intersectionPoint.Add(iPoint);
                            intersectionNormal.Add((startPoint - intersectionPoint).Normalize());
                        }
                    }

                }
            }
            //if (status == true)
            //    return true;
            //status = false;
            //no edge collision
            //check for vertex collision
            for (int i = 0; i < m_vertices.Length; i++)
            {
                MyVector DVP;
                DVP = m_vertices[i] - startPoint;
                double a = rVelocity.LengthSq;
                double b = -2 * (DVP * rVelocity);
                double c = DVP.LengthSq - (sphere.Radius * sphere.Radius);
                double delta = b * b - 4 * a * c;
                if (delta >= 0)
                {

                    double t;
                    if (a > 0)
                    {
                        t = (-b - Math.Sqrt(delta)) / (2 * a);
                    }
                    else
                    {
                        t = (-b + Math.Sqrt(delta)) / (2 * a);
                    }
                    if (t < -0.04)
                        continue;
                    if (nPoints > 0 && t > collisionTime)
                        continue;
                    //if (status == false || (status == true && collisionTime > t))
                    //{
                    //    intersectionPoint = m_vertices[i];
                    //    intersectionNormal = startPoint - intersectionPoint;
                    //    intersectionNormal.Normalize();

                    //    status = true;
                    //    collisionTime = (float)t;
                    //}
                    if (nPoints == 0)
                    {
                        nPoints = 1;

                        intersectionPoint = m_vertices[i];
                        intersectionNormal = startPoint - intersectionPoint;
                        intersectionNormal.Normalize();
                        collisionTime = (float)t;
                    }
                    else if (t < collisionTime)
                    {
                        nPoints = 1;

                        intersectionPoint = m_vertices[i];
                        intersectionNormal = startPoint - intersectionPoint;
                        intersectionNormal.Normalize();
                        collisionTime = (float)t;
                    }
                    else if (t == collisionTime && nPoints > 0)
                    {
                        nPoints++;
                        intersectionPoint.Add(m_vertices[i]);
                        intersectionNormal.Add((startPoint - intersectionPoint).Normalize());
                    }
                }
            }
            if (nPoints > 1)
            {
                intersectionPoint.Divide(nPoints);
                intersectionNormal.Normalize();
            }

            return (nPoints > 0);
        }
Example #35
0
 /// <summary>
 /// 相対位置を変更
 /// </summary>
 /// <param name="position">相対位置</param>
 public void SetRelativePosition(Vector3 position)
 {
     collision    = new CollisionSphere(position, 0.05f); //Collisions
     baseDistance = collision.Position;                   //注目目標との相対位置関係
 }
Example #36
0
    void PushBack()
    {
        if (spheres != null)
        {
            for (int i = 0; i < spheres.Length; ++i)
            {
                CollisionSphere s = spheres[i];

                if (s != null)
                {
                    foreach (Collider collider in Physics.OverlapSphere(OffsetPosition(s.Offset), bodyRadius, walkable))
                    {
                        Vector3 position     = OffsetPosition(s.Offset);
                        Vector3 contactPoint = Vector3.zero;

                        if (collider is BoxCollider)
                        {
                            contactPoint = RPGCollisions.ClosestPointOn((BoxCollider)collider, position);
                        }
                        else if (collider is SphereCollider)
                        {
                            contactPoint = RPGCollisions.ClosestPointOn((SphereCollider)collider, position);
                        }
                        else if (collider is MeshCollider)
                        {
                            RPGMesh rpgMesh = collider.GetComponent <RPGMesh>();

                            if (rpgMesh != null)
                            {
                                contactPoint = rpgMesh.ClosestPointOn(position, bodyRadius, displayDebugInfo, displayExtendedDebugInfo);
                            }
                            else
                            {
                                MeshCollider mc = (MeshCollider)collider;

                                if (mc.convex)
                                {
                                    contactPoint = mc.ClosestPointOnBounds(position);
                                }
                                else
                                {
                                    continue;
                                }
                            }
                        }
                        else if (collider is CapsuleCollider)
                        {
                        }
                        else if (collider is TerrainCollider)
                        {
                        }
                        else if (collider is WheelCollider)
                        {
                            Debug.LogWarning("[RPGMotor] WheelColliders not supported");
                        }
                        else
                        {
                            continue;
                        }

                        if (contactPoint != Vector3.zero)
                        {
                            //如果这个sphere是脚
                            //我们接触一个地面
                            //并且球的位置在接触位置之上
                            //我们应该忽略它
                            if (s.IsFeet && HasGround && CurrentGround.IsTouching && position.y > contactPoint.y)
                            {
                                continue;
                            }

                            //如果这个球是头
                            //并且跳跃
                            //并且撞到了头,就终止跳跃
                            if (s.IsHead && IsJumping && contactPoint.y > (position.y + bodyRadius * 0.25f))
                            {
                                JumpDone(null);
                            }

                            Vector3 v = position - contactPoint;

                            if (displayDebugInfo)
                            {
                                Debug.DrawLine(position, contactPoint, Color.red);
                            }

                            if (displayExtendedDebugInfo)
                            {
                                //Debug.Log("[RPGMotor] Contact point " + contactPoint);
                            }

                            target.position += Vector3.ClampMagnitude(v, Mathf.Clamp(bodyRadius - v.magnitude, 0, bodyRadius));
                        }
                    }
                }
            }
        }
    }
        public bool IntersectSphere(out MyVector intersectionPoint, out MyVector intersectionNormal, out float collisionTime,
            MyVector startPoint, MyVector endPoint, float dt, CollisionSphere sphere)
        {
            intersectionPoint = new MyVector();
            intersectionNormal = new MyVector();
            MyVector rVelocity = (endPoint - startPoint) / dt;

            collisionTime = 0;
            MyVector sPoint = startPoint - Normal * sphere.Radius;
            MyVector ePoint = endPoint - Normal * sphere.Radius;
            if (sPoint * Normal >= 0 && ePoint * Normal <= 0)
            {
                intersectionNormal = Normal;
                float dist = Normal * sPoint;
                collisionTime = -dist / (Normal * rVelocity);
                intersectionPoint = sPoint + collisionTime * rVelocity;

                return true;
            }
            return false;
        }
        public HalkCapitalShip(long _uniqueId, Vector3 _position, Quaternion _rotation)
            : base(_uniqueId, _position, _rotation, Team.Halk)
        {
            #region Camera Positions
            cameraPositions = new Vector3[]
                {
                    new Vector3(0, 50000, 0),
                    new Vector3(0, -140, 10680),
                    new Vector3(-8510, 1425, -450),
                    new Vector3(8510, 1425, -450)
                };

            cameraViews = new Vector3[]
                {
                    new Vector3(0, -1, 0),
                    new Vector3(0, -40, 6680),
                    new Vector3(-4510, 1525, -450),
                    new Vector3(4510, 1525, -450)
                };

            cameraUps = new Vector3[]
                {
                    new Vector3(0, 0, 1),
                    new Vector3(0, 1, 0),
                    new Vector3(0, 1, 0),
                    new Vector3(0, 1, 0)
                };
            #endregion

            screenModel = ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/H_L_Doors");

            // Center positions of the pieces, mostly for drawing recticles
            shipPiecePositions = new Vector3[]
            {
                new Vector3(5445.229f, -307.698f, 4933.062f),
                new Vector3(5445.229f, -307.698f, 416.721f),
                new Vector3(3357.501f, 1666.45f, -333.489f),
                new Vector3(5445.229f, -307.698f, -3335.115f),
                new Vector3(5445.229f, -307.698f, -6154.579f),

                new Vector3(0.0f, -40.992f, 6505.973f),
                new Vector3(0.0f, -40.992f, 6505.973f),
                new Vector3(0.0f, 2860.938f, 1518.291f),
                new Vector3(0.0f, 634.938f, -3443.972f),
                new Vector3(0.0f, 108.806f, -5768.761f),

                new Vector3(-5445.229f, -307.698f, -5567.618f),
                new Vector3(-5080.176f, -307.698f, -3067.395f),
                new Vector3(-3357.501f, 1666.45f, -333.489f),
                new Vector3(-5080.176f, -307.698f, 793.405f),
                new Vector3(-5080.176f, -307.698f, 4593.555f),

                new Vector3(0.0f, 2051.71f, -137.093f),
            };

            #region ShipPositions & Spawns
            #region Assault Fighters
            assaultFighterPositions = new Vector3[]
                {
                    new Vector3(0, -40, 6680),
                    new Vector3(-90, -40, 6805),
                    new Vector3(90, -40, 6805),

                    new Vector3(0, -90, 6805),
                    new Vector3(-90, -90, 6930),
                    new Vector3(90, -90, 6930),

                    new Vector3(0, 10, 6805),
                    new Vector3(-90, 10, 6930),
                    new Vector3(90, 10, 6930),
                };
            assaultFighterForward = Quaternion.CreateFromAxisAngle(Vector3.Backward, 0);

            for (int i = 0; i < INITIAL_ASSAULT_FIGHTERS; i++)
            {
                assaultFighterPositions[i] = Vector3.Transform(assaultFighterPositions[i], Rotation) + Position;
            }
            assaultFighterForward = Rotation * assaultFighterForward;
            #endregion

            #region Bombers
            bomberPositions = new Vector3[]
                {
                    new Vector3(-4510, 1525, -450),
                    new Vector3(-4635, 1525, -540),
                    new Vector3(-4635, 1525, -360),

                    new Vector3(-4635, 1475, -450),
                    new Vector3(-4760, 1475, -540),
                    new Vector3(-4760, 1475, -360),

                    new Vector3(-4635, 1575, -450),
                    new Vector3(-4760, 1575, -540),
                    new Vector3(-4760, 1575, -360),
                };

            bomberForward = Quaternion.CreateFromAxisAngle(Vector3.Right, 0);
            bomberForward *= Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90), 0, 0);

            for (int i = 0; i < INITIAL_BOMBERS; i++)
            {
                bomberPositions[i] = Vector3.Transform(bomberPositions[i], Rotation) + Position;
            }
            bomberForward = Rotation * bomberForward;
            #endregion

            #region Interceptors
            interceptorPositions = new Vector3[]
                {
                    new Vector3(4510, 1525, -450),
                    new Vector3(4635, 1525, -540),
                    new Vector3(4635, 1525, -360),

                    new Vector3(4635, 1475, -450),
                    new Vector3(4760, 1475, -540),
                    new Vector3(4760, 1475, -360),

                    new Vector3(4635, 1575, -450),
                    new Vector3(4760, 1575, -540),
                    new Vector3(4760, 1575, -360),
                };
            interceptorForward = Quaternion.CreateFromAxisAngle(Vector3.Left, 0);
            interceptorForward *= Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90), 0, 0);

            for (int i = 0; i < INITIAL_INTERCEPTORS; i++)
            {
                interceptorPositions[i] = Vector3.Transform(interceptorPositions[i], Rotation) + Position;
            }
            interceptorForward = Rotation * interceptorForward;
            #endregion
            #endregion

            #region Turrets
            List<Turret> turrets1 = new List<Turret>();
            List<Turret> turrets2 = new List<Turret>();
            List<Turret> turrets3 = new List<Turret>();
            List<Turret> turrets4 = new List<Turret>();
            List<Turret> turrets5 = new List<Turret>();
            List<Turret> turrets6 = new List<Turret>();
            List<Turret> turrets7 = new List<Turret>();
            List<Turret> turrets8 = new List<Turret>();
            List<Turret> turrets9 = new List<Turret>();
            List<Turret> turrets10 = new List<Turret>();
            List<Turret> turrets11 = new List<Turret>();
            List<Turret> turrets12 = new List<Turret>();
            List<Turret> turrets13 = new List<Turret>();
            List<Turret> turrets14 = new List<Turret>();
            List<Turret> turrets15 = new List<Turret>();
            List<Turret> turrets16 = new List<Turret>();

            turrets15.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-3953.558f, -237.003f, 6822.489f), Rotation),
                Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-1.534f), MathHelper.ToRadians(8.676f), MathHelper.ToRadians(0f)),
                Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-1.534f), MathHelper.ToRadians(8.676f), MathHelper.ToRadians(0f))), 30, this));
            turrets15.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5161.55f, -237.003f, 6487.202f), Rotation),
                Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-1.618f), MathHelper.ToRadians(-20.327f), MathHelper.ToRadians(0.794f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-1.618f), MathHelper.ToRadians(-20.327f), MathHelper.ToRadians(0.794f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, 733.959f, 7806.728f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, 733.959f, 7806.728f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1616.194f, -1806.898f, 1909.851f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(21.805f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(21.805f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1616.194f, -1806.898f, 1909.851f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(21.805f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(21.805f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5699.605f, 2176.875f, 1039.199f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5699.605f, 2176.875f, -2058.457f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5699.605f, 2176.875f, 1039.199f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5699.605f, 2176.875f, -2058.457f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f))), 30, this));
            // 10
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6458.046f, 614.606f, -1719.562f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6431.109f, 591.44f, -2617.56f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6399.605f, 567.043f, -3694.177f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-0.073f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-0.073f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6384.504f, 522.777f, -4727.678f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6426.581f, -1215.904f, -4727.678f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.985f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.985f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6455.911f, -1243.601f, -3694.177f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(49.023f), MathHelper.ToRadians(93.692f), MathHelper.ToRadians(4.278f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(49.023f), MathHelper.ToRadians(93.692f), MathHelper.ToRadians(4.278f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6482.029f, -1279.068f, -2617.56f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(35.4f), MathHelper.ToRadians(92.256f), MathHelper.ToRadians(-9.243f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(35.4f), MathHelper.ToRadians(92.256f), MathHelper.ToRadians(-9.243f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6518.696f, -1289.28f, -1719.562f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.985f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.985f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6154.156f, 926.766f, 1997.336f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6162.478f, 919.087f, 1099.337f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            // 20
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6352.585f, 729.876f, 22.721f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.562f), MathHelper.ToRadians(90.68f), MathHelper.ToRadians(134.879f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-179.562f), MathHelper.ToRadians(90.68f), MathHelper.ToRadians(134.879f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6389.78f, 693.441f, -1010.78f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6581.313f, -1238.029f, -1010.78f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.773f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.773f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6579.683f, -1240.462f, 166.853f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(92.342f), MathHelper.ToRadians(92.95f), MathHelper.ToRadians(47.43f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(92.342f), MathHelper.ToRadians(92.95f), MathHelper.ToRadians(47.43f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6567.688f, -1249.722f, 1243.469f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(35.4f), MathHelper.ToRadians(92.256f), MathHelper.ToRadians(-9.243f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(35.4f), MathHelper.ToRadians(92.256f), MathHelper.ToRadians(-9.243f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6577.115f, -1242.669f, 2141.467f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.985f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.985f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6769.449f, -538.398f, 3191.67f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(86.131f), MathHelper.ToRadians(-14.113f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(86.131f), MathHelper.ToRadians(-14.113f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6699.151f, -538.398f, 4245.415f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(86.131f), MathHelper.ToRadians(-14.113f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(86.131f), MathHelper.ToRadians(-14.113f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6663.679f, -538.398f, 5213.905f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(86.131f), MathHelper.ToRadians(-14.113f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(86.131f), MathHelper.ToRadians(-14.113f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6386.836f, -538.398f, 6306.999f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(75.606f), MathHelper.ToRadians(-14.113f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(75.606f), MathHelper.ToRadians(-14.113f))), 30, this));
            // 30
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6386.836f, -538.398f, -538.398f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(75.606f), MathHelper.ToRadians(-14.113f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(75.606f), MathHelper.ToRadians(-14.113f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5956.463f, -500.581f, 7528.904f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(20.235f), MathHelper.ToRadians(65.063f), MathHelper.ToRadians(7.877f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(20.235f), MathHelper.ToRadians(65.063f), MathHelper.ToRadians(7.877f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5156.184f, -500.581f, 8237.227f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.537f), MathHelper.ToRadians(-0.589f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(1.537f), MathHelper.ToRadians(-0.589f), MathHelper.ToRadians(0f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5110.803f, -1430.69f, 6905.87f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(28.059f), MathHelper.ToRadians(63.37f), MathHelper.ToRadians(-72.894f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(28.059f), MathHelper.ToRadians(63.37f), MathHelper.ToRadians(-72.894f))), 30, this));
            turrets1.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5129.771f, -1847.84f, 5212.155f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(29.322f), MathHelper.ToRadians(82.158f), MathHelper.ToRadians(-73.176f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(29.322f), MathHelper.ToRadians(82.158f), MathHelper.ToRadians(-73.176f))), 30, this));
            turrets5.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6384.504f, 522.777f, -5565.283f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets5.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(6341.374f, -1258.673f, -5565.283f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(300.773f), MathHelper.ToRadians(93.306f), MathHelper.ToRadians(253.917f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(300.773f), MathHelper.ToRadians(93.306f), MathHelper.ToRadians(253.917f))), 30, this));
            turrets5.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5280.929f, -1845.324f, -5594.301f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(295.795f), MathHelper.ToRadians(103.543f), MathHelper.ToRadians(221.273f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(295.795f), MathHelper.ToRadians(103.543f), MathHelper.ToRadians(221.273f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5280.929f, -1911.245f, -3837.246f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(282.79f), MathHelper.ToRadians(102.486f), MathHelper.ToRadians(207.928f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(282.79f), MathHelper.ToRadians(102.486f), MathHelper.ToRadians(207.928f))), 30, this));
            turrets4.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5280.929f, -1966.913f, -2445.786f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(286.453f), MathHelper.ToRadians(98.892f), MathHelper.ToRadians(211.204f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(286.453f), MathHelper.ToRadians(98.892f), MathHelper.ToRadians(211.204f))), 30, this));
            // 40
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5280.929f, -2003.682f, -637.639f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(263.578f), MathHelper.ToRadians(95.642f), MathHelper.ToRadians(189.538f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(263.578f), MathHelper.ToRadians(95.642f), MathHelper.ToRadians(189.538f))), 30, this));
            turrets2.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5582.091f, -1922.029f, 2737.305f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(270.539f), MathHelper.ToRadians(102.172f), MathHelper.ToRadians(195.391f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(270.539f), MathHelper.ToRadians(102.172f), MathHelper.ToRadians(195.391f))), 30, this));
            turrets5.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5604.601f, 1013.781f, -5544.579f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(70.664f), MathHelper.ToRadians(95.776f), MathHelper.ToRadians(148.266f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(70.664f), MathHelper.ToRadians(95.776f), MathHelper.ToRadians(148.266f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, -861.24f, 7805.235f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, -861.24f, 7805.095f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, 1495.151f, 7568.532f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.804f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.804f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, 1525.514f, 5803.048f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.666f), MathHelper.ToRadians(1.082f), MathHelper.ToRadians(-0.938f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.666f), MathHelper.ToRadians(1.082f), MathHelper.ToRadians(-0.938f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1172.61f, 1614.518f, 5462.168f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.804f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.804f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1129.483f, 1532.576f, 7575.583f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90.973f), MathHelper.ToRadians(6.65f), MathHelper.ToRadians(0.633f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90.973f), MathHelper.ToRadians(6.65f), MathHelper.ToRadians(0.633f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, -1596.435f, 7806.728f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            // 50
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, -1681.07f, 7495.593f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.123f), MathHelper.ToRadians(-1.619f), MathHelper.ToRadians(-3.937f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(89.123f), MathHelper.ToRadians(-1.619f), MathHelper.ToRadians(-3.937f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, -1684.258f, 5674.688f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(84.839f), MathHelper.ToRadians(-0.37f), MathHelper.ToRadians(-5.282f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(84.839f), MathHelper.ToRadians(-0.37f), MathHelper.ToRadians(-5.282f))), 30, this));
            turrets6.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1241.226f, -1636.03f, 5674.688f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(88.711f), MathHelper.ToRadians(1.322f), MathHelper.ToRadians(1.259f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(88.711f), MathHelper.ToRadians(1.322f), MathHelper.ToRadians(1.259f))), 30, this));
            turrets7.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, -1685.669f, 3591.917f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.947f), MathHelper.ToRadians(-0.775f), MathHelper.ToRadians(-9.101f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.947f), MathHelper.ToRadians(-0.775f), MathHelper.ToRadians(-9.101f))), 30, this));
            turrets7.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, -1650.918f, 3589.366f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(10.377f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(10.377f))), 30, this));
            turrets7.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1654.777f, 1450.12f, 3683.626f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.026f), MathHelper.ToRadians(1.415f), MathHelper.ToRadians(-17.337f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.026f), MathHelper.ToRadians(1.415f), MathHelper.ToRadians(-17.337f))), 30, this));
            turrets7.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1609.457f, 1409.882f, 3248.44f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90.053f), MathHelper.ToRadians(-5.811f), MathHelper.ToRadians(18.087f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90.053f), MathHelper.ToRadians(-5.811f), MathHelper.ToRadians(18.087f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-373.938f, 2099.811f, 3448.665f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-46.038f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-46.038f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-983.839f, 3621.956f, 1765.883f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1331.168f, 3856.8f, 344.307f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            // 60
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1331.168f, 3856.8f, 344.307f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(2083.951f, 3771.96f, -1857.823f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.119f), MathHelper.ToRadians(0.905f), MathHelper.ToRadians(-0.608f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-162.119f), MathHelper.ToRadians(0.905f), MathHelper.ToRadians(-0.608f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-2083.951f, 3771.96f, -1857.823f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-159.557f), MathHelper.ToRadians(1.402f), MathHelper.ToRadians(-1.34f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-159.557f), MathHelper.ToRadians(1.402f), MathHelper.ToRadians(-1.34f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1397.262f, 2882.107f, 2360.486f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-38.146f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-38.146f), MathHelper.ToRadians(0f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1397.262f, 2882.107f, 2360.486f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(38.146f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(38.146f), MathHelper.ToRadians(0f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5698.648f, 1313.326f, 1039.199f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, -3085.618f, 811.64f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5698.648f, 1313.326f, 1039.199f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(90f), MathHelper.ToRadians(0f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5698.648f, 1313.326f, -2058.457f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f))), 30, this));
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1453.611f, -2710.361f, 811.64f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.969f), MathHelper.ToRadians(0.114f), MathHelper.ToRadians(-42.45f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.969f), MathHelper.ToRadians(0.114f), MathHelper.ToRadians(-42.45f))), 30, this));
            // 70
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1453.611f, -2710.361f, 811.64f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.971f), MathHelper.ToRadians(-0.072f), MathHelper.ToRadians(41.226f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.971f), MathHelper.ToRadians(-0.072f), MathHelper.ToRadians(41.226f))), 30, this));
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1373.741f, -2584.897f, -1154.941f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(93.752f), MathHelper.ToRadians(0f), MathHelper.ToRadians(-39.129f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(93.752f), MathHelper.ToRadians(0f), MathHelper.ToRadians(-39.129f))), 30, this));
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1373.741f, -2584.897f, -1154.941f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(94.71f), MathHelper.ToRadians(-0.013f), MathHelper.ToRadians(38.454f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(94.71f), MathHelper.ToRadians(-0.013f), MathHelper.ToRadians(38.454f))), 30, this));
            turrets9.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1453.611f, -2549.924f, -3003.217f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90.587f), MathHelper.ToRadians(-0.17f), MathHelper.ToRadians(-38.026f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90.587f), MathHelper.ToRadians(-0.17f), MathHelper.ToRadians(-38.026f))), 30, this));
            turrets9.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, -2639.126f, -3003.217f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(96.222f), MathHelper.ToRadians(-1.386f), MathHelper.ToRadians(33.86f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(96.222f), MathHelper.ToRadians(-1.386f), MathHelper.ToRadians(33.86f))), 30, this));
            turrets10.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1453.611f, -2247.169f, -5549.897f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.614f), MathHelper.ToRadians(0.97f), MathHelper.ToRadians(-33.133f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(91.614f), MathHelper.ToRadians(0.97f), MathHelper.ToRadians(-33.133f))), 30, this));
            turrets10.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1453.611f, -2247.169f, -5549.897f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(92.461f), MathHelper.ToRadians(0.73f), MathHelper.ToRadians(34.208f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(92.461f), MathHelper.ToRadians(0.73f), MathHelper.ToRadians(34.208f))), 30, this));
            turrets10.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, 3069.206f, -5549.897f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-126.355f), MathHelper.ToRadians(65.813f), MathHelper.ToRadians(-9.074f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-126.355f), MathHelper.ToRadians(65.813f), MathHelper.ToRadians(-9.074f))), 30, this));
            turrets10.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, 3216.834f, -5549.897f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(101.724f), MathHelper.ToRadians(4.33f), MathHelper.ToRadians(-206.43f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(101.724f), MathHelper.ToRadians(4.33f), MathHelper.ToRadians(-206.43f))), 30, this));
            turrets9.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1279.945f, 3314.872f, -3003.217f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(-153.801f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(-153.801f))), 30, this));
            // 80
            turrets9.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1279.945f, 3315.649f, -3003.217f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(154.618f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(154.618f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(3496.364f, 2961.216f, -2139.638f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5470.439f, 2273.246f, -2377.812f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(3496.364f, 2961.216f, -2139.638f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5470.439f, 2273.246f, -2377.812f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-161.1f), MathHelper.ToRadians(-0.459f), MathHelper.ToRadians(-0.842f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5166.348f, 1862.074f, 1703.733f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-18.411f), MathHelper.ToRadians(-5.618f), MathHelper.ToRadians(-15.821f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-18.411f), MathHelper.ToRadians(-5.618f), MathHelper.ToRadians(-15.821f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(3170.162f, 3128.398f, 1155.579f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-60.738f), MathHelper.ToRadians(-2.117f), MathHelper.ToRadians(-15.854f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-60.738f), MathHelper.ToRadians(-2.117f), MathHelper.ToRadians(-15.854f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-3045.814f, 3121.189f, 1263.399f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-19.824f), MathHelper.ToRadians(-0.066f), MathHelper.ToRadians(2.123f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-19.824f), MathHelper.ToRadians(-0.066f), MathHelper.ToRadians(2.123f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(5166.348f, 1862.074f, 1703.733f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-18.411f), MathHelper.ToRadians(-5.618f), MathHelper.ToRadians(-15.821f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-18.411f), MathHelper.ToRadians(-5.618f), MathHelper.ToRadians(-15.821f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-2901.898f, 3532.982f, 344.307f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.747f), MathHelper.ToRadians(-0.285f), MathHelper.ToRadians(21.479f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.747f), MathHelper.ToRadians(-0.285f), MathHelper.ToRadians(21.479f))), 30, this));
            // 90
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(4631.224f, 2859.626f, 411.096f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.214f), MathHelper.ToRadians(1.404f), MathHelper.ToRadians(-23.879f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.214f), MathHelper.ToRadians(1.404f), MathHelper.ToRadians(-23.879f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-4631.224f, 2799.065f, 344.307f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.406f), MathHelper.ToRadians(-0.371f), MathHelper.ToRadians(23.664f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.406f), MathHelper.ToRadians(-0.371f), MathHelper.ToRadians(23.664f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(2901.898f, 3532.982f, 344.307f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.163f), MathHelper.ToRadians(1.336f), MathHelper.ToRadians(-21.728f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.163f), MathHelper.ToRadians(1.336f), MathHelper.ToRadians(-21.728f))), 30, this));
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6464.686f, 614.606f, -1719.562f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-126.781f), MathHelper.ToRadians(91.465f), MathHelper.ToRadians(7.434f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-126.781f), MathHelper.ToRadians(91.465f), MathHelper.ToRadians(7.434f))), 30, this));
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6515.85f, 591.44f, -2617.56f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.328f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.328f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6574.89f, 567.043f, -3694.177f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(270.79f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(270.79f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets11.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-7132.872f, 522.777f, -5476.045f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-84.189f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-84.189f), MathHelper.ToRadians(0f))), 30, this));
            turrets11.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-7132.872f, -1215.904f, -5476.045f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-84.189f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(0f), MathHelper.ToRadians(-84.189f), MathHelper.ToRadians(0f))), 30, this));
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6569.768f, -1243.601f, -3694.177f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(158.282f), MathHelper.ToRadians(95.559f), MathHelper.ToRadians(16.422f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(158.282f), MathHelper.ToRadians(95.559f), MathHelper.ToRadians(16.422f))), 30, this));
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6448.469f, -1279.068f, -2617.56f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(161.963f), MathHelper.ToRadians(94.102f), MathHelper.ToRadians(16.734f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(161.963f), MathHelper.ToRadians(94.102f), MathHelper.ToRadians(16.734f))), 30, this));
            // 100
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6429.133f, -1289.28f, -1719.562f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(383.351f), MathHelper.ToRadians(91.437f), MathHelper.ToRadians(244.83f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(383.351f), MathHelper.ToRadians(91.437f), MathHelper.ToRadians(244.83f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6044.427f, 778.519f, 1997.336f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(168.108f), MathHelper.ToRadians(92.096f), MathHelper.ToRadians(-57.452f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(168.108f), MathHelper.ToRadians(92.096f), MathHelper.ToRadians(-57.452f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6157.026f, 730.37f, 1099.337f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(202.058f), MathHelper.ToRadians(94.702f), MathHelper.ToRadians(-23.007f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(202.058f), MathHelper.ToRadians(94.702f), MathHelper.ToRadians(-23.007f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6263.889f, 702.556f, 22.721f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(207.518f), MathHelper.ToRadians(92.67f), MathHelper.ToRadians(-17.524f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(207.518f), MathHelper.ToRadians(92.67f), MathHelper.ToRadians(-17.524f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6384.6f, 654.82f, -1010.78f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(225.944f), MathHelper.ToRadians(93.921f), MathHelper.ToRadians(1.622f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(225.944f), MathHelper.ToRadians(93.921f), MathHelper.ToRadians(1.622f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6407.977f, -1238.029f, -1010.78f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(229.234f), MathHelper.ToRadians(106.591f), MathHelper.ToRadians(92.511f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(229.234f), MathHelper.ToRadians(106.591f), MathHelper.ToRadians(92.511f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6277.368f, -1164.391f, 127.842f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(181.091f), MathHelper.ToRadians(96.087f), MathHelper.ToRadians(36.225f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(181.091f), MathHelper.ToRadians(96.087f), MathHelper.ToRadians(36.225f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6108.751f, -1249.722f, 1243.469f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(114.791f), MathHelper.ToRadians(91.571f), MathHelper.ToRadians(-20.888f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(114.791f), MathHelper.ToRadians(91.571f), MathHelper.ToRadians(-20.888f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6087.566f, -1242.669f, 2141.467f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(182.119f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(182.119f), MathHelper.ToRadians(91.306f), MathHelper.ToRadians(45.363f))), 30, this));
            turrets15.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6242.753f, -538.398f, 3191.67f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-370.708f), MathHelper.ToRadians(81.942f), MathHelper.ToRadians(-183.312f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-370.708f), MathHelper.ToRadians(81.942f), MathHelper.ToRadians(-183.312f))), 30, this));
            // 110
            turrets15.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6233.683f, -295.971f, 4245.415f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-338.654f), MathHelper.ToRadians(79.642f), MathHelper.ToRadians(-159.705f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-338.654f), MathHelper.ToRadians(79.642f), MathHelper.ToRadians(-159.705f))), 30, this));
            turrets15.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5920.788f, -538.398f, 5213.905f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-342.755f), MathHelper.ToRadians(81.265f), MathHelper.ToRadians(-148.029f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-342.755f), MathHelper.ToRadians(81.265f), MathHelper.ToRadians(-148.029f))), 30, this));
            turrets11.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-4597.679f, -2040.064f, -5832.757f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5637.044f, -1938.13f, -3837.246f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(102.571f), MathHelper.ToRadians(98.709f), MathHelper.ToRadians(357.202f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(102.571f), MathHelper.ToRadians(98.709f), MathHelper.ToRadians(357.202f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5637.044f, -1833.107f, 33.902f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(252.557f), MathHelper.ToRadians(94.216f), MathHelper.ToRadians(145.755f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(252.557f), MathHelper.ToRadians(94.216f), MathHelper.ToRadians(145.755f))), 30, this));
            turrets12.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5611.833f, -1913.113f, -1833.449f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(262.413f), MathHelper.ToRadians(95.444f), MathHelper.ToRadians(157.121f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(262.413f), MathHelper.ToRadians(95.444f), MathHelper.ToRadians(157.121f))), 30, this));
            turrets14.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5335.882f, -1789.109f, 2737.305f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(261.935f), MathHelper.ToRadians(100.189f), MathHelper.ToRadians(155.896f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(261.935f), MathHelper.ToRadians(100.189f), MathHelper.ToRadians(155.896f))), 30, this));
            turrets15.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-5034.054f, -1562.371f, 5267.118f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(31.708f), MathHelper.ToRadians(82.158f), MathHelper.ToRadians(-73.176f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(31.708f), MathHelper.ToRadians(82.158f), MathHelper.ToRadians(-73.176f))), 30, this));
            turrets9.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-2453.638f, 2751.554f, -3003.217f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(268.406f), MathHelper.ToRadians(-0.278f), MathHelper.ToRadians(27.042f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(268.406f), MathHelper.ToRadians(-0.278f), MathHelper.ToRadians(27.042f))), 30, this));
            turrets10.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(2453.638f, 2470.914f, -5549.897f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(111.105f), MathHelper.ToRadians(16.185f), MathHelper.ToRadians(-206.749f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(111.105f), MathHelper.ToRadians(16.185f), MathHelper.ToRadians(-206.749f))), 30, this));
            // 120
            turrets9.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(2453.638f, 2751.554f, -3003.217f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(269.281f), MathHelper.ToRadians(-1.449f), MathHelper.ToRadians(-26.684f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(269.281f), MathHelper.ToRadians(-1.449f), MathHelper.ToRadians(-26.684f))), 30, this));
            turrets10.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-2453.638f, 2469.494f, -5549.897f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(114.568f), MathHelper.ToRadians(34.107f), MathHelper.ToRadians(227.792f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(114.568f), MathHelper.ToRadians(34.107f), MathHelper.ToRadians(227.792f))), 30, this));
            turrets10.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(0f, -2550.234f, -5549.897f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(92.416f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(92.416f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets9.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(0f, -2844.579f, -3003.217f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(94.268f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(94.268f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(0f, -2880.672f, -1154.941f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(96.391f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(96.391f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets16.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(0f, -3085.618f, 811.64f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(95.203f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(95.203f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(4631.224f, 2799.065f, -1244.237f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.731f), MathHelper.ToRadians(1.415f), MathHelper.ToRadians(-24.236f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.731f), MathHelper.ToRadians(1.415f), MathHelper.ToRadians(-24.236f))), 30, this));
            turrets3.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(2901.898f, 3532.982f, -1244.237f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.187f), MathHelper.ToRadians(1.368f), MathHelper.ToRadians(-22.758f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-88.187f), MathHelper.ToRadians(1.368f), MathHelper.ToRadians(-22.758f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(1331.168f, 3856.8f, -1244.237f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-1331.168f, 3856.8f, -1244.237f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            // 130
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-2901.898f, 3532.982f, -1244.237f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.747f), MathHelper.ToRadians(-0.285f), MathHelper.ToRadians(21.479f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-87.747f), MathHelper.ToRadians(-0.285f), MathHelper.ToRadians(21.479f))), 30, this));
            turrets13.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-4631.224f, 2799.065f, -1244.237f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.406f), MathHelper.ToRadians(-0.371f), MathHelper.ToRadians(23.664f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-89.406f), MathHelper.ToRadians(-0.371f), MathHelper.ToRadians(23.664f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(983.839f, 3621.956f, 1765.883f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets8.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(373.938f, 2099.811f, 3448.665f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-46.038f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-46.038f), MathHelper.ToRadians(0.579f), MathHelper.ToRadians(-0.486f))), 30, this));
            turrets11.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6386.105f, -2040.064f, -5705.264f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets11.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6386.105f, -2024.796f, -4986.711f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets11.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-4597.679f, 1100.64f, -5517.225f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));
            turrets11.Add(SceneObjectFactory.createHalkTurret(Position + Vector3.Transform(new Vector3(-6386.105f, 1100.64f, -5389.732f), Rotation),
                  Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f)),
                  Vector3.Transform(Vector3.Up, Rotation * Quaternion.CreateFromYawPitchRoll(MathHelper.ToRadians(-90f), MathHelper.ToRadians(0f), MathHelper.ToRadians(0f))), 30, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP1"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD1"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC1"),
                100, turrets1, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP2"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD2"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC2"),
                100, turrets2, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP3"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD3"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC3"),
                100, turrets3, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP4"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD4"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC4"),
                100, turrets4, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP5"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD5"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC5"),
                100, turrets5, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP6"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD6"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC6"),
                100, turrets6, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP7"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD7"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC7"),
                100, turrets7, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP8"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD8"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC8"),
                100, turrets8, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP9"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD9"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC9"),
                100, turrets9, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP10"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD10"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC10"),
                100, turrets10, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP11"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD11"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC11"),
                100, turrets11, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP12"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD12"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC12"),
                100, turrets12, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP13"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD13"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC13"),
                100, turrets13, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP14"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD14"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC14"),
                100, turrets14, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP15"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD15"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC15"),
                100, turrets15, this));

            shipPieces.Add(new SpawnShipPiece(UniqueId, Position, Rotation, ShipTeam,
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCP16"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCD16"),
                ContentLoadManager.loadModel("Models/Ships/CapitalShipSections/HCC16"),
                100, turrets16, this));
            #endregion

            Initialize();

            setModelByString("Models/box");
            destroyedModel = Model;
            setCloseModelByString("Models/box");
            // collisionMesh = ContentLoadManager.loadModel("Models/Ships/Halk_Capital_Collision");

            radiusSphere = new CollisionSphere(Position, Model);

            /*collisionBase = new CollisionMesh(collisionMesh, Position, Rotation);
            collisionBase.setActive(true);
            collisionBase.addCollisionEvent(collisionEvent);
            collisionBase.setParent(this);*/
        }
Example #39
0
        public Bomber(long _uniqueId, Vector3 _position, Quaternion _rotation, Team _team, SpawnShip _home)
            : base(_uniqueId, _position, _rotation, _team, _home)
        {
            maxZSpeed = 7500.0f;
            minZSpeed = 150.0f;
            normalZSpeed = 350.0f;
            ZSpeed = NormalZSpeed;

            MAX_HEALTH = 7;
            Health = MaxHealth;

            MAX_SHIELDS = 3;
            Shields = MaxShields;

            SHIELD_RECOVER_RATE = 0.05f;

            rollAccel = 5.5f;
            rollBreak = 4.5f;
            rollCap = 1.5f;

            pitchAccel = 4.5f;
            pitchBreak = 3.5f;
            pitchCap = 0.75f;

            yawAccel = 4.5f;
            yawBreak = 3.5f;
            yawCap = 0.75f;

            baseHeat = 0.35f;
            heat = 0;
            overheatHeat = 1.5f;
            heatingRate = 0.5f;
            coolingRate = 0.1f;
            heatDamageRate = 0.75f;
            heatWarningThreshold = 1.2f;
            heatDamageThreshold = 1.4f;

            accelerationRate = 10000.0f;

            FIRE_RATE = 0.35f;
            fireTimer = FireRate;

            SPECIAL_RATE = 1.0f;
            specialTimer = SpecialRate;

            SecondaryAmmo = MaxSecondaryAmmo;

            CollisionBase = new CollisionSphere(_position, 10);
            CollisionBase.Parent = this;
            CollisionBase.addCollisionEvent(collisionEvent);

            if (ShipTeam == Team.Esxolus)
            {
                ((Sphere)CollisionBase.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = EsxolusShipGroup;
            }
            else
            {
                ((Sphere)CollisionBase.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = HalkShipGroup;
            }

            INTEREST_TIME = 50; // Default for ship is 20

            Shields = 3; // TO SHOW SCALING BARS
        }
        public void SphereAndTriTest()
        {
            bool intersect = false;

            CollisionSphere sphere = new CollisionSphere(1f, 1f);

            Triangle triangleHAU = new Triangle(new Vector3(0, 1, 10), new Vector3(-10, 1, -10), new Vector3(10, 1, -10));
            Triangle triangleHBU = new Triangle(new Vector3(0, 0, 10), new Vector3(-10, 0, -10), new Vector3(10, 0, -10));
            Triangle triangleHCU = new Triangle(new Vector3(0, -1, 10), new Vector3(-10, -1, -10), new Vector3(10, -1, -10));

            Triangle triangleHAD = new Triangle(new Vector3(0, 1, 10), new Vector3(10, 1, -10), new Vector3(-10, 1, -10));
            Triangle triangleHBD = new Triangle(new Vector3(0, 0, 10), new Vector3(10, 0, -10), new Vector3(-10, 0, -10));
            Triangle triangleHCD = new Triangle(new Vector3(0, -1, 10), new Vector3(10, -1, -10), new Vector3(-10, -1, -10));


            sphere.SetPosition(new Vector3(0, 2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAU);
            Assert.AreEqual(true, intersect, "Error en Triángulo sobre 0 normal UP, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(0, 0, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAU);
            Assert.AreEqual(true, intersect, "Error en Triángulo sobre 0 normal UP, contacto perfecto bajo plano");
            sphere.SetPosition(new Vector3(0, 1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAU);
            Assert.AreEqual(true, intersect, "Error en Triángulo sobre 0 normal UP, contacto en mitad de la esfera");
            sphere.SetPosition(new Vector3(0, 3, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAU);
            Assert.AreEqual(false, intersect, "Error en Triángulo sobre 0 normal UP, sin contacto sobre el plano");
            sphere.SetPosition(new Vector3(0, -1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAU);
            Assert.AreEqual(false, intersect, "Error en Triángulo sobre 0 normal UP, sin contacto bajo el plano");

            sphere.SetPosition(new Vector3(0, 2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAD);
            Assert.AreEqual(true, intersect, "Error en Triángulo sobre 0 normal DOWN, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(0, 0, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAD);
            Assert.AreEqual(true, intersect, "Error en Triángulo sobre 0 normal DOWN, contacto perfecto bajo plano");
            sphere.SetPosition(new Vector3(0, 1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAD);
            Assert.AreEqual(true, intersect, "Error en Triángulo sobre 0 normal DOWN, contacto en mitad de la esfera");
            sphere.SetPosition(new Vector3(0, 3, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAD);
            Assert.AreEqual(false, intersect, "Error en Triángulo sobre 0 normal DOWN, sin contacto sobre el plano");
            sphere.SetPosition(new Vector3(0, -1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHAD);
            Assert.AreEqual(false, intersect, "Error en Triángulo sobre 0 normal DOWN, sin contacto bajo el plano");



            sphere.SetPosition(new Vector3(0, 1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(true, intersect, "Error en Triángulo en 0 normal UP, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(0, -1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(true, intersect, "Error en Triángulo en 0 normal UP, contacto perfecto bajo plano");
            sphere.SetPosition(new Vector3(0, 0, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(true, intersect, "Error en Triángulo en 0 normal UP, contacto en mitad de la esfera");
            sphere.SetPosition(new Vector3(0, 2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(false, intersect, "Error en Triángulo en 0 normal UP, sin contacto sobre el plano");
            sphere.SetPosition(new Vector3(0, -2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(false, intersect, "Error en Triángulo en 0 normal UP, sin contacto bajo el plano");

            sphere.SetPosition(new Vector3(0, 1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBD);
            Assert.AreEqual(true, intersect, "Error en Triángulo en 0 normal DOWN, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(0, -1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBD);
            Assert.AreEqual(true, intersect, "Error en Triángulo en 0 normal DOWN, contacto perfecto bajo plano");
            sphere.SetPosition(new Vector3(0, 0, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBD);
            Assert.AreEqual(true, intersect, "Error en Triángulo en 0 normal DOWN, contacto en mitad de la esfera");
            sphere.SetPosition(new Vector3(0, 2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBD);
            Assert.AreEqual(false, intersect, "Error en Triángulo en 0 normal DOWN, sin contacto sobre el plano");
            sphere.SetPosition(new Vector3(0, -2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBD);
            Assert.AreEqual(false, intersect, "Error en Triángulo en 0 normal DOWN, sin contacto bajo el plano");



            sphere.SetPosition(new Vector3(0, 0, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCU);
            Assert.AreEqual(true, intersect, "Error en Triángulo en -1 normal UP, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(0, -2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCU);
            Assert.AreEqual(true, intersect, "Error en Triángulo en -1 normal UP, contacto perfecto bajo plano");
            sphere.SetPosition(new Vector3(0, -1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCU);
            Assert.AreEqual(true, intersect, "Error en Triángulo en -1 normal UP, contacto en mitad de la esfera");
            sphere.SetPosition(new Vector3(0, 1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCU);
            Assert.AreEqual(false, intersect, "Error en Triángulo en -1 normal UP, sin contacto sobre el plano");
            sphere.SetPosition(new Vector3(0, -3, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCU);
            Assert.AreEqual(false, intersect, "Error en Triángulo en -1 normal UP, sin contacto bajo el plano");

            sphere.SetPosition(new Vector3(0, 0, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCD);
            Assert.AreEqual(true, intersect, "Error en Triángulo en -1 normal DOWN, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(0, -2, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCD);
            Assert.AreEqual(true, intersect, "Error en Triángulo en -1 normal DOWN, contacto perfecto bajo plano");
            sphere.SetPosition(new Vector3(0, -1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCD);
            Assert.AreEqual(true, intersect, "Error en Triángulo en -1 normal DOWN, contacto en mitad de la esfera");
            sphere.SetPosition(new Vector3(0, 1, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCD);
            Assert.AreEqual(false, intersect, "Error en Triángulo en -1 normal DOWN, sin contacto sobre el plano");
            sphere.SetPosition(new Vector3(0, -3, 0));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHCD);
            Assert.AreEqual(false, intersect, "Error en Triángulo en -1 normal DOWN, sin contacto bajo el plano");


            sphere.SetPosition(new Vector3(-9, 0, 9));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(false, intersect, "Error en Triángulo en -1 normal DOWN, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(9, 0, 9));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(false, intersect, "Error en Triángulo en -1 normal DOWN, contacto perfecto sobre plano");
            sphere.SetPosition(new Vector3(0, 0, -12));
            intersect = IntersectionTests.SphereAndTri(sphere, triangleHBU);
            Assert.AreEqual(false, intersect, "Error en Triángulo en -1 normal DOWN, contacto perfecto sobre plano");
        }
Example #41
0
    void PushBack()
    {
        if (spheres != null)
        {
            for (int i = 0; i < spheres.Length; ++i)
            {
                CollisionSphere s = spheres[i];

                if (s != null)
                {
                    foreach (Collider collider in Physics.OverlapSphere(OffsetPosition(s.Offset), bodyRadius, walkable))
                    {
                        Vector3 position     = OffsetPosition(s.Offset);
                        Vector3 contactPoint = Vector3.zero;

                        if (collider is BoxCollider)
                        {
                            contactPoint = RPGCollisions.ClosestPointOn((BoxCollider)collider, position);
                        }
                        else if (collider is SphereCollider)
                        {
                            contactPoint = RPGCollisions.ClosestPointOn((SphereCollider)collider, position);
                        }
                        else if (collider is MeshCollider)
                        {
                            RPGMesh rpgMesh = collider.GetComponent <RPGMesh>();

                            if (rpgMesh != null)
                            {
                                contactPoint = rpgMesh.ClosestPointOn(position, bodyRadius, displayDebugInfo, displayExtendedDebugInfo);
                            }
                            else
                            {
                                // Make last ditch try for convex colliders
                                MeshCollider mc = (MeshCollider)collider;

                                if (mc.convex)
                                {
                                    contactPoint = mc.ClosestPointOnBounds(position);
                                }
                                else
                                {
                                    continue;
                                }
                            }
                        }
                        else if (collider is CapsuleCollider)
                        {
                            Debug.LogWarning("[RPGMotor] CapsuleCollider not supported");
                        }
                        else if (collider is TerrainCollider)
                        {
                        }
                        else if (collider is WheelCollider)
                        {
                            Debug.LogWarning("[RPGMotor] WheelColliders not supported");
                        }
                        else
                        {
                            continue;
                        }

                        if (contactPoint != Vector3.zero)
                        {
                            // If the sphere is feet
                            // We have a ground and we're touching
                            // And the sphere position is above the contact position
                            // We should ignore it
                            if (s.IsFeet && HasGround && CurrentGround.IsTouching && position.y > contactPoint.y)
                            {
                                continue;
                            }

                            // If this is the head sphere
                            // And we're jumping
                            // And we hit the "top" of the sphere, abort jumping
                            if (s.IsHead && IsJumping && contactPoint.y > (position.y + bodyRadius * 0.25f))
                            {
                                JumpDone(null);
                            }

                            // Vector from contact point to position
                            Vector3 v = position - contactPoint;

                            // Draw debug line
                            if (displayDebugInfo)
                            {
                                Debug.DrawLine(position, contactPoint, Color.red);
                            }

                            // Display extend debug info
                            if (displayExtendedDebugInfo)
                            {
                                Debug.Log("[RPGMotor] Contact point " + contactPoint);
                            }

                            // Move object away from collision
                            target.position += Vector3.ClampMagnitude(v, Mathf.Clamp(bodyRadius - v.magnitude, 0, bodyRadius));
                        }
                    }
                }
            }
        }
    }
    /**
     * Extract the cloth collision information from a list of bones.
     * The information is parsed from the bone names.
     */
    public static CollisionGeometry Find(List <SkeletonBone> bones)
    {
        CollisionGeometry result = new CollisionGeometry();

        // Tails of the linked lists
        CollisionSphere   spheresTail   = null;
        CollisionCylinder cylindersTail = null;

        // Parse cloth bone state from Skeleton
        for (var i = 0; i < bones.Count; i++)
        {
            var name = bones[i].Name;
            if (name.StartsWith("#Sphere", StringComparison.OrdinalIgnoreCase))
            {
                var valueStart = name.IndexOf('{');
                var valueEnd   = name.IndexOf('}', valueStart);
                var radius     = 0.0f;
                if (valueStart != -1 && valueEnd != -1)
                {
                    var radiusText = name.AsSpan(valueStart + 1, valueEnd - valueStart - 1);
                    float.TryParse(
                        radiusText,
                        NumberStyles.Float,
                        CultureInfo.InvariantCulture,
                        out radius
                        );
                }

                var newClothSphere = new CollisionSphere();
                newClothSphere.radius = radius;
                newClothSphere.next   = null;
                newClothSphere.boneId = i;

                // Append to the linked list structure
                if (result.firstSphere == null)
                {
                    result.firstSphere = newClothSphere;
                    spheresTail        = result.firstSphere;
                }
                else
                {
                    spheresTail.next = newClothSphere;
                    spheresTail      = spheresTail.next;
                }

                continue;
            }

            if (name.StartsWith("#Cylinder", StringComparison.InvariantCultureIgnoreCase))
            {
                var valueStart = name.IndexOf('{');
                var sep        = name.IndexOf(',', valueStart);
                var valueEnd   = name.IndexOf('}', sep);

                var radius = 0.0f;
                var height = 0.0f;
                if (valueStart != -1 && sep != -1 && valueEnd != -1)
                {
                    var radiusText = name.AsSpan(valueStart + 1, sep - valueStart - 1);
                    float.TryParse(
                        radiusText,
                        NumberStyles.Float,
                        CultureInfo.InvariantCulture,
                        out radius
                        );

                    var heightText = name.AsSpan(sep + 1, valueEnd - sep - 1);
                    float.TryParse(
                        heightText,
                        NumberStyles.Float,
                        CultureInfo.InvariantCulture,
                        out radius
                        );
                }

                var newClothCyl = new CollisionCylinder();
                newClothCyl.radius = radius;
                newClothCyl.height = height;
                newClothCyl.next   = null;
                newClothCyl.boneId = i;

                if (result.firstCylinder == null)
                {
                    result.firstCylinder = newClothCyl;
                    cylindersTail        = result.firstCylinder;
                }
                else
                {
                    cylindersTail.next = newClothCyl;
                    cylindersTail      = cylindersTail.next;
                }

                continue;
            }
        }

        return(result);
    }
Example #43
0
 //Calculate the position of the sphere collisions in world coordinates
 private Vector3 SpherePosition(CollisionSphere sphere)
 {
     return(transform.position + sphere.offset * transform.up);
 }
	//Calculate the position of the sphere collisions in world coordinates
	private Vector3 SpherePosition(CollisionSphere sphere)
	{
		return transform.position + sphere.offset * transform.up;
	}
	//Set Collider radius and spheres
	private void SetCollisionParameters()
	{
		radius = myCollider.radius*myCollider.transform.localScale.x;
		if(myCollider)
		{
			for(int i = 0; i < numberOfSpheres; i++)
			{
				if(i == 0)
				{
					sphere.isFeet = true;
					sphere.isHead = false;
					sphere.offset = radius;
					feet = sphere;
				}
				else if(i == numberOfSpheres - 1)
				{
					sphere.isFeet = false;
					sphere.isHead = true;
					sphere.offset = (myCollider.height*myCollider.transform.localScale.y - radius);
				}
				else
				{
					sphere.isFeet = false;
					sphere.isHead = false;
					//TODO Add sphere offset if number of spheres is greater than two!
				}
				collisionSpheres.Add(sphere);
			}
		}
		else
		{
			Debug.LogWarning("Please attach a capsule collider to character");
		}
	}