This is really for people who have used a 3d engine which only uses Quaternions internally and wanted to mimic Blitz3D's functionality. It's not related to B3d though, which is why I didn't post it there.
It seems I can mimic RotateEntity() just fine. I convert Euler to Quaternion ( I can do this just fine ) and then use that. As I say, as far as I can see, this is working.
The problem comes with TurnEntity. The best way I can think of to do it is to retrieve the Quaternion orientation, convert to euler, add/subtract the angles, convert back to quats and reorient. Kinda long winded, but worse, it has problems. Not sure if the problems are related to the conversion or something else, but I can't seem to fix it.
Is there a better way of doing this? Is there a way I can cut the double conversion to one conversion? For example, can I convert the change in angle that TurnEntity() takes as a parameter and just add that to the current orientation, returned as as Quat?
It seems I can mimic RotateEntity() just fine. I convert Euler to Quaternion ( I can do this just fine ) and then use that. As I say, as far as I can see, this is working.
The problem comes with TurnEntity. The best way I can think of to do it is to retrieve the Quaternion orientation, convert to euler, add/subtract the angles, convert back to quats and reorient. Kinda long winded, but worse, it has problems. Not sure if the problems are related to the conversion or something else, but I can't seem to fix it.
Is there a better way of doing this? Is there a way I can cut the double conversion to one conversion? For example, can I convert the change in angle that TurnEntity() takes as a parameter and just add that to the current orientation, returned as as Quat?