public EliteFighter() : base() { //ModelName = models[random.Next() % models.Count()]; ModelName = models[3]; Look = new Vector3(SteeringBehaviours.RandomClamped() , SteeringBehaviours.RandomClamped() , SteeringBehaviours.RandomClamped() ); Look.Normalize(); }
public Fighter(String modelName) { worldTransform = Matrix.Identity; pos = new Vector3(0, 10, 0); look = new Vector3(0, 0, -1); right = new Vector3(1, 0, 0); up = new Vector3(0, 1, 0); globalUp = new Vector3(0, 1, 0); steeringBehaviours = new SteeringBehaviours(this); drawAxis = false; Solid = true; this.modelName = modelName; }
public Fighter() { worldTransform = Matrix.Identity; pos = new Vector3(0, 10, 0); look = new Vector3(0, 0, -1); right = new Vector3(1, 0, 0); up = new Vector3(0, 1, 0); globalUp = new Vector3(0, 1, 0); steeringBehaviours = new SteeringBehaviours(this); drawAxis = false; Solid = true; modelName = "models/ColonialFleet/Military/ViperMkII"; }
public Fighter() { worldTransform = Matrix.Identity; Position = new Vector3(0, 10, 0); Look = new Vector3(0, 0, -1); Right = new Vector3(1, 0, 0); Up = new Vector3(0, 1, 0); globalUp = new Vector3(0, 1, 0); steeringBehaviours = new SteeringBehaviours(this); drawAxis = false; Solid = true; modelName = "boa"; }
public Fighter() { worldTransform = Matrix.Identity; Position = new Vector3(0, 10, 0); Look = new Vector3(0, 0, -1); Right = new Vector3(1, 0, 0); Up = new Vector3(0, 1, 0); globalUp = new Vector3(0, 1, 0); steeringBehaviours = new SteeringBehaviours(this); drawAxis = false; Solid = true; modelName = "boa"; }
public float getYaw() { Vector3 localLook = Look; localLook.Y = basis.Y; localLook.Normalize(); SteeringBehaviours.checkNaN(ref localLook, Vector3.Forward); float angle = (float)Math.Acos(Vector3.Dot(basis, localLook)); if (Look.X > 0) { angle = (MathHelper.Pi * 2.0f) - angle; } return(angle); }