3D Navigation

Hey guys,

What’s the best way to navigate in three dimentions (for a space sim)? My application currently uses HPR and XYZ, but it does have problems because the coordinates appear to be relative to the world and not relative to the object (so when you flip upside down your controls invert).

Is it possible to eliminate this and get precise navigation just using XYZ / HPR? Anyone have any experience getting this to work?



Yes, if you want to move or rotate relative to the object, specify it as first parameter to a setHpr, setPos, getHpr, or getPos call:

obj.setPos(obj, 0, 1, 0) # 1 unit forward
obj.setH(obj, 45) # rotate 45 degrees

Simply brilliant. Thank you!