Jump to content

Weird Physics bounce.


Pryme8
 Share

Recommended Posts

https://www.babylonjs-playground.com/#U8PQNW#2

Hi P8!  You're using "loaded" dice.  :)

Watch console.  After first bounce, physicsBody.quaternion starts tilting... which causes crap to fall apart.  :)

I checked the table/floor to make sure it is perfectly level.  It seems to be.

There's a tiny possibility that d1's pivot/origin is not perfectly centered, or that the plugin is using a slightly mis-shapen or mathematically-rounded boundingBox... to create the impostor.

Line 71 can be used as a terribly-limited work-around/proof.  Yuh, yuh, yuh. 

Oimo has a "randomizer" in it, but I don't know what it is used-for, and I haven't seen one in Cannon docs, yet.

Fun challenge!  Should we balance d1 on a needle-point, and see if/which way it falls off?  :)  Might need world.allowSleep = true, if not already set that way.  Otherwise, we might get a tiny amount of "brownian jitter" when d1 is placed atop needle.  Still, ideally, that jitter should be straight up/down the Y-axis, one would think (no side-sliding/lateral movement).

There's already some jitter on d2.  I see "moving jaggies" where d2 meets ground.

Is there any wind blowing... in this scene?  :D

Hey P8, remember over in the chronicles.. when we were sliding that box down a thin rail, and we had to tweak and tweak until the box would stop tipping-off-of the rail... before it reached the end of the sliding?  Related, eh?  *nod*.

Link to comment
Share on other sites

Go to the #1 variation of the scene effectively It does not matter but I was wondering what the underlying factor behind it was.  I’m assuming there is some sort of contact randomization or something like that or perhaps a margin of error In the restitution/collision calculation that’s is causing a slight change.  I mean I’m pretty sure if you dropped a perfectly flat box ona perfectly flat ground there would be no variation in the bounce ideally it would go up and down perfectly though In principal would be so hard to create, so maybe just ignoring it is the best idea.

Link to comment
Share on other sites

Yep, me too, wondering why.  That's why I speculated about boundingBox measurements and pivot points... being incorrect by a small epsilon value somewhere.

Are you going digging for the reason?  Going to test with wireframed spheres?  I'll watch.  Here, taste this xmas fudge that someone gave me.  NUMMM! :)

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