MinsuKim Posted July 20, 2018 Share Posted July 20, 2018 hi! always thanks to us today also i has one problem =_=.... problem is " mesh rotation data do not change" that means i load a one *.babylon files used BABYLON.SceneLoader.Append() and then event to mesh rotation below my code var onPointerMove = function (evt) { if (evt.movementX < 0) { loadmesh.rotation.y -= 0.1; } else{ loadmesh.rotation.y += 0.1; } } this is like a change on Scene but always rotation.y = 0 who are you this issue??? this issue is only load mesh data problem below code no problem makeBox = new BABYLON.MeshBuilder.CreateBox() I am confused now T.T Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 20, 2018 Share Posted July 20, 2018 Only thing I can think of is that the mesh.rotation is not being used because there is a mesh.rotationQuaternion. https://doc.babylonjs.com/features/position,_rotation,_scaling#rotationquaternion What if you try something like this instead? mesh.rotate(BABYLON.Axis.Y, 0.1, BABYLON.Space.LOCAL); MinsuKim 1 Quote Link to comment Share on other sites More sharing options...
MinsuKim Posted July 20, 2018 Author Share Posted July 20, 2018 @brianzinn hi brian! thank you for reply your code correct! one more question set is know how to get a rotate value? mesh.rotation is same thing always zero value T.T i only Get/Set rotation.y some difficult Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted July 20, 2018 Share Posted July 20, 2018 Hi @MinsuKim If the rotationQuaternion property is used, the rotation property will always be 0. if you want to use rotation, and not rotationQuaternion, something like: mesh.rotationQuaternion = null; should do the trick. MinsuKim 1 Quote Link to comment Share on other sites More sharing options...
MinsuKim Posted July 20, 2018 Author Share Posted July 20, 2018 @aWeirdo oops! really?? but this mesh is load the *.babylon.... um.... more think..... Quote Link to comment Share on other sites More sharing options...
MinsuKim Posted July 20, 2018 Author Share Posted July 20, 2018 i find it! thank you @adam @aWeirdo your reply it is hint thank you!! @brianzinn you also very thank you! There are many great people on the forum. Thank you all. brianzinn 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.