Project Washington
|
I figured the best place to start with PW is a basic player control and camera system. The greatest challenge of this first bit of development was getting used to Unreal and it's somewhat complicated (and scarcely documented) scripting language and class hierarchy. Had it not been for some great tutorials I stumbled across, I would never have been able to figure out this camera system. Perhaps it would be nice if I described this camera system I keep referring to. Well, it's a two part camera system, consisting of a third person JFG-style follow camera, and a over-the-shoulder Gears of War style targeting camera. While I tried hard to keep the third person camera true to the one in JFG, the ability to orbit and steer with the mouse was added for convenience. Fortunately, Epic has included a ton of functionality in UnrealScript, which made player movement, animation, and other basic things extremely easy. This also helped with the camera too, but so did some user contributed tutorials. That's not to say there weren't problems along the way however. The tutorials were never designed to work together, and the third person camera did not allow the player to adjust the pitch. Utilizing rotation linear interpolation, the RLerp function in UnrealScript, I was able to smoothly transition into the manual targeting camera no matter where the third person camera was. Also, the pitch adjustment was added by always setting the Z component of the direction vector equal to the player controller's rotation Z component after being typecasted to a vector. The most elusive problem was at the very end, when the player left manual targeting it was setting the third person camera to -810,16384,0 no matter what. The third person cam should be facing the same way as you were while in manual targeting, or it will get very disorienting and confusing. Thus, a bool variable was set to tell the third person camera to do something different when the manual target camera was just active. Well that's a wall of text for you, if you made it this far I suppose you deserve to watch the video of it in action:
The assets you see here are UT3 assets included with the UDK, they are just placeholders and will be replaced with PW assets. Last Updated (Saturday, 19 June 2010 06:38) |
Project Washington

