Jump to content

non constant radius with CreateTube function


AngiB
 Share

Recommended Posts

Hi,

I want to create a tube with two kinks.  However the radius near the kinks is different to my defined radius in the CreateTube function.  I would expect a constant radius .Here is a playground example:

http://www.babylonjs-playground.com/#1EX6VF

Furthermore, if I reduce the distance between the kinks I get a strange effect:  

http://www.babylonjs-playground.com/#1EX6VF#6

I`m using BabylonJS version 2.4.

Thanks for your help

Link to comment
Share on other sites

The CreateTube() function uses an algo to smoothly twist the tube according to its curves. In your case, the "curve" (or path) is really rough because it has only 4 points, what leads to really extreme twisting effects. I would suggest that you add far more points (maybe a sinus curve over an angle of PI / 2) to define something more smooth.

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