vujadin / BabylonHx

Port of Babylon.js 3D engine to Haxe.
http:/paradoxplay.com/babylonhx
Apache License 2.0
189 stars 43 forks source link

Rotation in Space.WORLD completely buggy #131

Closed ramsestom closed 7 years ago

ramsestom commented 7 years ago

I have a cube that I rotate with:

_cube.rotate(rotationAxis, rotationAngle*animationSpeed, Space.WORLD);

where

rotationAxis is a Vector3

and this rotation is completely buggy. After 2 or 3 quater rotations, the cube mesh is completely deformed (it is no longer a cube) Don't know if it is linked to the warning regarding the presence of a loop into the Vector3 class and if this is this class that cause this issue or if it is something else but the mesh rotate function seems completely broken for now

vujadin commented 7 years ago

have you tried it in bjs? can you make a simple test in babylonjs-playground.com?

ramsestom commented 7 years ago

on babylonjs it is working fine and so was it on babylonhx a few months ago. I just performed an update of babylonhx (didn't play with it since 4-5 months) and what was working fine previously just do not work anymore... will post you the link to a babylonjs-playground code sample in a few minutes (I already made one with this cube rotation a few months ago so just need to find the link back ;) )

ramsestom commented 7 years ago

http://www.babylonjs-playground.com/#F3TFY swipe horizontally or vertically with mouse to rotate the box

my babylonhx code is a bit more complicated because I perform the rotation as an animation (one step at each frame) but it shouldn't change the result...

vujadin commented 7 years ago

ok, thanks!

vujadin commented 7 years ago

this should be fixed now....

vujadin commented 7 years ago

This test http://www.babylonjs-playground.com/#F3TFY#2 is working in bhx exactly the same way

ramsestom commented 7 years ago

Well looks like the changes you pushed in the repository yesterday fixed this bug. I just updated BabylonHX with this new version and the rotation is working fine now...