Jump to content

How to move picked vertices from mesh?


ozRocker
 Share

Recommended Posts

6 hours ago, Deltakosh said:

That's what I'm doing here: https://www.babylonjs.com/scenes/worldmonger/

But not that obvious as you need to also recompute normals accordingly

This looks cool!  But I think it doesn't load properly 'cos of the errors.  I'm getting a lot of 

Mixed Content: The page at 'https://www.babylonjs.com/scenes/worldmonger/' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/jquery-1.9.1.js'. This request has been blocked; the content must be served over HTTPS.

kind of errors, so its failing to load jquery.  Hmm...I must have a sensitive version of Chrome, 'cos normally you can mix HTTPS and HTTP without a problem

Link to comment
Share on other sites

14 minutes ago, Arte said:

Hi ozRocker,

Is this what you are looking for?

"CAT IS PICKED! Line 60-61-62" https://www.babylonjs-playground.com/#1BAPRM#104

Yes! Thank you :)  It looks like I needed to use scene.pointerX instead of evt.clientX

Now I need to get the vertices moving when I click on them.  I have a selected vertices array, but they aren't moving anywhere

https://www.babylonjs-playground.com/#1BAPRM#106

Link to comment
Share on other sites

6 hours ago, JohnK said:

Just a thought is your mesh created as updatable?

 

I can't find anywhere how to make a mesh updatable :/ 

This is Schrödinger's cat that's on the Babylonjs server so its not my mesh.  What's the command to make it updatable?  Apologies if this is a dumb question but I've searched the doco and read the forum posts

Link to comment
Share on other sites

I think I got it.  I added these lines

        cat.setVerticesData(BABYLON.VertexBuffer.PositionKind, cat.getVerticesData(BABYLON.VertexBuffer.PositionKind), true);			
        cat.setVerticesData(BABYLON.VertexBuffer.NormalKind, cat.getVerticesData(BABYLON.VertexBuffer.NormalKind), true);		

https://www.babylonjs-playground.com/#1BAPRM#107

 

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