Game Development Community

T2dSceneCamera.AnimatePosition??????

by Anthony Ayers · in Torque X 2D · 06/03/2008 (8:00 am) · 0 replies

I am attempting to "scroll" the camera based upon the mouse position - so basically if my mouse gets within X from the screen edge, then begin scrolling in that direction.

Does this method work? If so, how??? This is what I have but all it does is make the screen flicker.....
MouseState ms = Mouse.GetState();
            worldCam.AnimatePositionTarget = new Vector2(ms.X, ms.Y);
             worldCam.AnimatePositionTime = 3.0f;
              worldCam.AnimatePosition();

anyone???