CodeBase - RTS Camera Movement
Return to the CodeBase listing
Category: Camera
Version: 1.0
Information
Uploaded: 27th Apr 2006 12:42
Modified: 27th Apr 2006 12:43
Author: Lazlazlaz 1
Summary
RTS Camera Movement - This camera control system functions like in any professional RTS game. You move the mouse close to the edge and the screen moves, move it closer and the screen moves faster. It also allows for different speeds and angles for the camera
Full Description
This code works by seeing if the mouse is close to the edge (within two different distances) this is worked out as a value relative to the screen width and height. Left and right movement is simple enough using the move camera left/right commands.<br /> Moving the camera forward/backward and maintain the angle the camera faces down can be done easily without any vector work. You just angle the camera to face directly forward as is default (angle camera 0), move it the required speed, then angle it back to the original angle.
Comments
No comments yet.