Tuesday 8 May 2012

Tunnel Flyer 3D Flight Controls Complete!

I just completed the 3D flight controls for Tunnel Flyer. The ship is controlled using the accelerometer. Riemers XNA Tutorial on quaternion rotations and flight kinematics were extremely useful for quickly wrapping my head around a nice easy way to rotate vectors. When using the accelerometer data for inputs, the movements were very choppy. I looked into using a filter of some kind, I quickly came across a low-pass filter but that wasn't what I was looking for. So I resorted to making my own smoothing algorithm that uses two previous input values to smooth out the current value. Overall the controls need a bit of tweaking but for now I'm quite happy with the result as now the ship moves around mostly fluidly. :-)

No comments:

Post a Comment