hcmetal Posted November 1, 2018 Share Posted November 1, 2018 Hello everyone, I am wondering if the "mesh.roation" attribute work differently on built-in mesh and imported mesh? As shown in this PG: https://playground.babylonjs.com/#WQGZB5 As I set the same rotation attribute: scene.registerBeforeRender(function() { rotationtest.rotation.y = 0.02; box.rotation.y = 0.02; }); The imported mesh rotates with a constant speed while the built-in box stays put. It apears as if the imported mesh rotates incrementally by local axis and the built-in box rotates by directly setting the rotation vector. What's happening under the hood? Can I make the imported mesh rotate like the built-in mesh (which makes much more sense to me)? Hope someone can point me to the right direction. Thanks alot! NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted November 1, 2018 Share Posted November 1, 2018 https://playground.babylonjs.com/#WQGZB5#1 maybe that just cover the main problem hcmetal and ssaket 2 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted November 1, 2018 Share Posted November 1, 2018 What @NasimiAsl did works, but it's hiding the underlying problem, which is that the imported mesh has the rotationQuaternion set. Maybe we need to update our docs as this has come up a few times and it can be confusing! https://playground.babylonjs.com/#WQGZB5#2 NasimiAsl and hcmetal 2 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted November 1, 2018 Share Posted November 1, 2018 yes as i say that just cover problem brianzinn 1 Quote Link to comment Share on other sites More sharing options...
hcmetal Posted November 1, 2018 Author Share Posted November 1, 2018 Thanks for your help! I wondered what "rotation quaternion" is all about when reading the doc on rotation. This clears things up for me. Quote Link to comment Share on other sites More sharing options...
JohnK Posted November 2, 2018 Share Posted November 2, 2018 1 hour ago, hcmetal said: I wondered what "rotation quaternion" is all about when reading the doc on rotation. https://doc.babylonjs.com/resources/rotation_conventions#quaternions hcmetal 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted November 2, 2018 Share Posted November 2, 2018 On 11/1/2018 at 7:58 AM, brianzinn said: Maybe we need to update our docs as this has come up a few times and it can be confusing! Done. Available next docs deployment. DylanD and hcmetal 2 Quote Link to comment Share on other sites More sharing options...
Guest Posted November 2, 2018 Share Posted November 2, 2018 Should be live in a few seconds JohnK, DylanD and hcmetal 3 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.