Cameras again...solved!

Oct 26, 2011 at 10:37 AM

I have written the following.

  1. MultiCameraBase -- base class with support for ICamera and rays.
  2. PanZoomCamera -- subclass with properties to control a first person camera: XYZ; Azimuth/Elevation/Roll; Zoom.
  3. OrbitCamera -- subclass with properties to control an inward looking orbital camera: Azimuth/Elevation/Radius; Yaw/Pitch/Roll; Zoom.
  4. MultiCameraController -- controller for a camera using animations, keyboard and mouse input, configurable.
  5. MultiCameraFactory -- creates customised cameras from the above components, ready to add to a game class.
  6. Sample that can use either kind of camera.

I'm done (apart from the odd bug). This is my final solution. Time to move on to other things.

I'm happy to contribute the code. Currently it is in my own namespace and uses my own naming conventions and formatting. Let me know if you're interested.

Oct 26, 2011 at 12:47 PM

I'll be glad to see how you did them, and perhaps see how it could be adopted. Submit a patch please :D

Oct 27, 2011 at 12:48 AM

OK, will upload. I'll have to upload the animation changes first, because there are dependencies. Otherwise, at least items 1-4 should slot right in. Item 5 is intended for customisation, and could possibly be replaced by something that reads and loads from an XML file. I haven't thought about that yet.

Rather than using my sample, it's probably better to add the camera to one of yours. I'll look into it.

Nov 8, 2011 at 3:30 AM

I've uploaded my general purpose camera and one of your samples modified to use it.

Please let me know if it's any use.