Jump to content

Jump mesh if add new mesh under first


Snow Bars
 Share

Recommended Posts

@Snow Bars -

Sorry that something appears to be lost in the translation, as everything you've coded appears to be working as expected. If possible, can you try and rephrase the question to make it clearer to understand specifically what behavior you are looking for on a per object basis? Perhaps make the question much longer and more thorough so that one of us might understand what you are expecting to see happen.

Thanks,

DB

Link to comment
Share on other sites

dbawel, thanks for comment.

Try to clarify the idea.

I have many meshes which I need them in lines one on one. I.e. one line of object exists on scene. I add one object under this line. I want this line automatically lifted up on the bottom object height. And if I delete bottom object the line must fall down. I may use arrays of objects and the cycles but there may be a huge amount of objects. And a huge amount of object lines too. I would like to simplify algorithm and I think that the physics engine may do all (or some) of these things.

Adam, thank you very much for the demo. Blocks lift down just as I need on the demo. What I would like to gain is to lift them up in the same way.

Link to comment
Share on other sites

Hi guys.  I did another version:  http://playground.babylonjs.com/#4OULE#4

It inserts/adds thin mesh at the bottom of the stack.. every 2 secs.

I have solved nothing... but... its something new to stare-at, and think about how to solve this challenge.  hmm - scratch scratch.

This ALMOST seems like a job for non-physics, if that is possible.

Add box TO bottom of stack, then move entire stack up == height of new box.

Remove box FROM bottom of stack, then move entire stack down == height of new box.

But maybe stacks are supposed to tip-over sideways, sometimes?  (in the game)  If so, then physics engine is a sure requirement... I think.

How to insert/remove any-size box from bottom, without much bounce/spring.  hmm.   Difficult.  I have ideas, still.  :)

Link to comment
Share on other sites

Not bad at all, Adam!  Not bad.  I sort of lost focus... http://playground.babylonjs.com/#4OULE#6

I got lost in the playing.  :)

http://playground.babylonjs.com/#4OULE#8

You would think that a stack of spheres would be far more wobbly than a stack of planes.  But nope... spheres stack very nice.  hmm.

I think we know why the stack of flat boxes tips over so easy, and often to the same side.  It's because of the same side-slide jitter that Steffan is experiencing with his load handler... me thinks.

Link to comment
Share on other sites

Hi DB!  Jump on in!  :)  I don't think we're anywhere near a perfect solution, yet.

I was thinking about making an invisible mass-less ground ABOVE the stack... repeatedly moving that upward the same amount as the height of the each newly-added box, and then reversing gravity

How innovative, eh?  (snicker)  New boxes will fall upward, and the mass 0 ground... atop the stack, will keep boxes from exiting into outer space.  Wha-da-ya-think, guys?  Crazy, huh?  When its time to remove boxes, normalize the gravity and remove from the bottom of the stack (true bottom).  Then move the invisible top-ground... downward... the same amount as the height of the removed box, and then reverse gravity again.  Wow! 

Toggling gravity direction... depending-upon add box or remove box.  Scary!  Might work.

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