yLacaute Posted March 10, 2018 Share Posted March 10, 2018 Hi, I am trying to rotate a mesh with a custom pivot, using setPivotMatrix function. In the sample below, the pivot (red box) "seems" to be in the right position, but the rotation done is not as expected (green and grey box should be superposed on the corner). I dont understand the setPivotMatrix http://www.babylonjs-playground.com/#4FNAXM#2 Why the pivot point (red box) is not inside the green box in this sample ? I just would like something like : X X [X] X X X Where [x] is the superposed part of the 2 meshes. Thanks Quote Link to comment Share on other sites More sharing options...
yLacaute Posted March 10, 2018 Author Share Posted March 10, 2018 Ok got it http://www.babylonjs-playground.com/#4FNAXM#5 I think samples in documentation should be updated, there are too complicated and some functions don't exist (like substract). https://doc.babylonjs.com/how_to/pivots Quote Link to comment Share on other sites More sharing options...
JohnK Posted March 11, 2018 Share Posted March 11, 2018 @yLacaute Well done for finding your own solution - we like that 11 hours ago, yLacaute said: some functions don't exist (like substract) Typing errors have been corrected and submitted. 11 hours ago, yLacaute said: I think samples in documentation should be updated, there are too complicated The great thing about the BJS documentation is that it is open source and anyone can submit to it. Please feel free to submit any simpler examples and explanation, contributions are always welcome. 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.