I understand the problem it occurs. and maybe that's why quaternions i use return Euler Angles >360 or <360 and maybe it's better.
Thanks for your code, i've tried it, and the same problem happen.
One way : I looked on the milkshape exporter for b3d, and maybe the problem is that blitz3d axis are not logical.
As we can see
Mark need to convert axis to get those of blitz3d.
Maybe quaternions libraries don't rectify this. ( not sure )
but as, i get quaternions form b3d file, they have to be in the good axis... I don't know how to explain all that, but i think rotations of b3d files are not as simple as "turnEntity Rx,Ry,Rz" using local coordinates from conversion of quaternions to Euler included in the b3d file.
I found the code from Pacemaker for import/export b3d files, but it does not attempt to build a scene using the b3d files.
It seems that noone has ever try it before ? maybe, I try to do something stupid :D
Thanks for your code, i've tried it, and the same problem happen.
One way : I looked on the milkshape exporter for b3d, and maybe the problem is that blitz3d axis are not logical.
As we can see
QUA_eulerToQuat(X#,Y#,Z#) rz#=x# rx#=y# ry#=z# r#=rz p#=rx# y#=ry# sp#=Sin(p/2):cp=Cos(p/2) sy#=Sin(y/2):cy=Cos(y/2) sr#=Sin(r/2):cr=Cos(r/2) quat[0]=cr*cp*cy + sr*sp*sy; quat[1]=sr*cp*cy - cr*sp*sy; quat[2]=cr*sp*cy + sr*cp*sy; quat[3]=cr*cp*sy - sr*sp*cy; quat[3]=-quat[3];
Mark need to convert axis to get those of blitz3d.
Maybe quaternions libraries don't rectify this. ( not sure )
but as, i get quaternions form b3d file, they have to be in the good axis... I don't know how to explain all that, but i think rotations of b3d files are not as simple as "turnEntity Rx,Ry,Rz" using local coordinates from conversion of quaternions to Euler included in the b3d file.
I found the code from Pacemaker for import/export b3d files, but it does not attempt to build a scene using the b3d files.
It seems that noone has ever try it before ? maybe, I try to do something stupid :D