Sign in to follow this  
yLacaute

Mesh rotation with pivot (beginner)

Recommended Posts

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 :huh:
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

 


 

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.