Jump to content

Simulate a Spring


Statics
 Share

Recommended Posts

Hi,

I'm trying to keep the sphere in this simulation  http://playground.babylonjs.com/#1VPUIR attached to the end of the spring.

Right now, the sphere will appear attached for the way the settings are currently set, however if I change the scaling of the spring to make it appear to stretch further I have to recalculate the position of the sphere.

Is there any way to keep the shpere at the end of the spring regardless of the scaling?

 

 

Link to comment
Share on other sites

Hi!  There's also the 'restitution' parameter in our add-on physics engines... but... that's a different subject... sort-of. 

Aside: See lines 38 and 39?  Pathetic attempts (by me) to get some normals aimed downward on the ground plane... so the hemiLight.groundColor could make the bottom of the ground visible.  Fail!  :)

Deltakosh is giggling at me, right now... I can hear him.  :D  (a ref to another thread, where I was confused about this subject and he had to straighten me out.)  Still... I try and try to get the bottom of the groundPlane lit with a hemi.  heh  It's just not fair! 

Ok, how about this.  We add a feature to .convertToFlatShadedMesh(invertNormals [boolean]);  If the flag is set true, then, all the normals that get added in the convertToFlatShaded... get added INVERTED.  A truly disgusting way to doubleSide a groundPlane!

Speaking of .sideOrientation, hey Jerome, you listening?  Was it you who added the sideOrientation section to the basic elements tutorial? 

Is that ONLY for ribbons?  I noticed that my line 39 does nothing for my groundPlane.  Have you told folks in the docs... that .sideOrientation is only for ribbons?  Or is it?  Thoughts?  thx.

Thread hijack complete.  :)

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