TurnEntity - Quaternion Example

BlitzMax Modules Forums/MiniB3D/TurnEntity - Quaternion Example

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

i just turned some eular angles into quat with
local v:Tvec=new Tvec3
v.set(0,0,1)
local q:Tquat=new Tquat
q.fromEuler()

Print q.w+"  "+q.x+"  "+q.y+"  "+q.z


what you need to do each frame is to work out the total amount you need to rotate in pitch heading and roll after
you have applied the effects of drag, gyroscopic intertia etc on the orientation changes, the change that into a quat with Tquat.fromEular like above

For someone who doesn't want a lot of math you have chosen a hum dinger of a subject, flight simulation is a nightmare!

incidentally the *vast* amount of people will NEVER need to use eulars as they are wandering along a reasonably constrained landscape (or flat platform)

keep plugging away you'll get it!