Wednesday, May 16, 2007


Scot Boyd, author of the upcoming book "Expert One on One: XNA Game Programming for Xbox 360 and Windows", has provided the source code of the "QuaternionCamera" class which will help you avoid that nasty Gimbal Lock problem that you may face when working with yaw, pitch and roll at a time.

From the post: "... XNA unfortunately does not provide a QuaternionCamera class in it's Framework. Nowhere on the Internet could I find a camera class that provides six degrees of freedom without requiring additional coding from the reader ... In the process of attacking this problem in my book, I've made a few camera classes. I'm posting the simplest class here - good for beginners. The final camera class in the book will be more complicated. This class should provide a good jumping-off point for anybody interested, or a simple helper class for those who just want a camera without hassles. In the camera, GetViewMatrix and CreateYawPitchRoll are where the money is ...".

Read on!

No comments:

Post a Comment

Any thoughts? Post them here ...