Beispiel #1
0
	// Use this for initialization
	void Start () {
		drifter = GetComponent<FirstPersonDrifter>();
		mouseLook = GetComponent<MouseLook>();
		mouseLookVert = Camera.main.GetComponent<MouseLook>();
		arcBall = holdPosition.GetComponent<ArcBall>();
		currentTarget = holdPositionTarget;

	}
        public override void Initialize()
        {
            base.Initialize();

            ball = new ArcBall();

            tmp_proj = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, GameContainer.Graphics.GraphicsDevice.Viewport.AspectRatio, 2, 3);
            tmp_view = Matrix.CreateLookAt(new Vector3(0, 0, 1), Vector3.Zero, Vector3.Up);

            msLast = Mouse.GetState();
        }