Jump to content

Mesh rotation with pivot (beginner)


yLacaute
 Share

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

 


 

Link to comment
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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...