Jump to content

Flat Shaded Mesh to Height Map Impostor


Recommended Posts

Hi guys.  I found someone's playground that uses a HeightmapImpostor.  I haven't used one before, much, or ever.

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

The boxes sure launch at high speeds and odd directions.  Not sure why. 

Experimenters can change line 11 to false... to use spheres.  Notice the conversion to flat shaded... in line 36.

Physics collisions seem to work, but strangely.  Activate lines 16-18 for random box scaling.  This (seemingly) makes the boxes sink into the heightmap to their origin/center.

SO, yeah, KPG... if you can show us a playground where flat shading is killing physics collisions, that would be great.  It would help us see your issue, better.  Feel free to modify the above playground and save new versions (and paste the new url's here, if you like).  We can talk about stuff.

There is a collision system built-into BJS, too.  It doesn't need Cannon plugin or physics Impostors.  Could you be talking about THAT type of collision and mesh-intersects (not working with flat-shaded heightMaps) ??  If so, we need to change our approach.  :)  Be well, guys.  We'll talk again soon, maybe.

Link to post
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...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...