コード例 #1
0
ファイル: DebugCamera.cs プロジェクト: MintL/datx02-rally
 public DebugCamera(InputComponent input)
     : base()
 {
     speed = MinSpeed = 3f;
     MaxSpeed = 50f;
     this.input = input;
 }
コード例 #2
0
        public ThirdPersonCamera(ITargetNode targetNode, InputComponent input)
            : base()
        {
            this.TargetNode = targetNode;
            this.input = input;

            // Constants

            Zoom = 330;
            RotationSpeed = .05f;
            RotationMagnet = .075f;
            TranslationMagnet = .98f;

            //lookUpOffset = Zoom * new Vector3(0, .275f, 0);
            //translationOffset = Zoom * new Vector3(0, .2f, 1);

            cameraRotation = TargetNode.RotationMatrix;
            cameraTranslation = TargetNode.TranslationMatrix;

            Position = Vector3.Transform(translationOffset, cameraRotation * cameraTranslation);
            View = Matrix.CreateLookAt(Position,
                Vector3.Transform(lookUpOffset, cameraRotation * cameraTranslation), Vector3.Up);
        }
コード例 #3
0
        public ThirdPersonCamera(ITargetNode targetNode, InputComponent input)
            : base()
        {
            this.TargetNode = targetNode;
            this.input      = input;

            // Constants

            Zoom              = 330;
            RotationSpeed     = .05f;
            RotationMagnet    = .075f;
            TranslationMagnet = .98f;

            //lookUpOffset = Zoom * new Vector3(0, .275f, 0);
            //translationOffset = Zoom * new Vector3(0, .2f, 1);

            cameraRotation    = TargetNode.RotationMatrix;
            cameraTranslation = TargetNode.TranslationMatrix;

            Position = Vector3.Transform(translationOffset, cameraRotation * cameraTranslation);
            View     = Matrix.CreateLookAt(Position,
                                           Vector3.Transform(lookUpOffset, cameraRotation * cameraTranslation), Vector3.Up);
        }
コード例 #4
0
 public DebugCamera(InputComponent input) : base()
 {
     speed      = MinSpeed = 3f;
     MaxSpeed   = 50f;
     this.input = input;
 }
コード例 #5
0
 public DebugCamera(Vector3 position, InputComponent input) : this(input)
 {
     this.Position = position;
 }
コード例 #6
0
 public CarControlComponent(GameManager game)
     : base(game)
 {
     this.input = game.GetService<InputComponent>();
     this.simulationStrategy = new DeadReckoningStrategy(Game);
 }
コード例 #7
0
 public CarControlComponent(GameManager game)
     : base(game)
 {
     this.input = game.GetService <InputComponent>();
     this.simulationStrategy = new DeadReckoningStrategy(Game);
 }
コード例 #8
0
ファイル: DebugCamera.cs プロジェクト: MintL/datx02-rally
 public DebugCamera(Vector3 position, InputComponent input)
     : this(input)
 {
     this.Position = position;
 }