Jump to content

How to get world rotation of vertices?


hen
 Share

Recommended Posts

1 hour ago, Deltakosh said:

hello actually you code applies a complete worldmatrix to your vertex including position,rotation and scaling.

You should first decompose the matrix with Matrix.decompose to get a position, quaternion and scaling vector:)

 

 

 

 

 

 

Thanks!  Now i can edit vertices via drag and drop as seen on the picture.

Babylon is surprising fast generating the mesh!

 

 

 

vertices.png

Link to comment
Share on other sites

6 hours ago, hen said:

Babylon is surprising fast generating the mesh!

correction - Babylon is surprising fast generating the mesh!:)

So, your first question was rather simple. The second one is much harder. reminded me of this - https://xkcd.com/1425/

In general you will have to track your mouse movement, very similar to the drag and drop demo on the playground. Afterwards you will have to change the scale/rotation/position according to the new values from the mouse movement. This cannot be done in one time - i don't know of a way to rotate, scale and reposition in one mouse movement.

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