Jump to content

Falling and Bouncing


You are about to reply to a thread that has been inactive for 4733 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello, I'm trying to get a ball to fall through pegs like plinko, but instead of bouncing around and falling the ball comes to a stop even though it should roll off the peg, I've tried switching the gravity, the friction and the material types. 

Any idea's or does it have to be scripted?

Link to comment
Share on other sites

Right click and edit the object and on the Object tab. make it a physical object. Should be a tic box there to set Physical on

 

 

hold it up in the air, drop it, and watch it fall and bounce after it hits the ground

 

Can also put the ball in a downhill slope and run thru a track ..

 

Good Luck :)

Link to comment
Share on other sites

Oh yes I see what you mean I did the same thing just now. Making the tops of the pegs tapered doesnt help either

Edit:

I did notice it does work if the ball is bigger. I think the ratio of the size is making it ballance on the peg. but making the ball slightly bigger it gave the desired result

 

Link to comment
Share on other sites

Here's the thing to understand about simulated physics.  It doesn't have any of the random chaos of the real world.  It's based on just a very finite set of mathematical principles.

In RL, if you could somehow magically remove all chaos, you'd see the exact same behavior you're seeing in SL.  Drop a perfect sphere precisely on-center onto a perfect cylinder, and the ball would not roll off.  Perfect gravity would pull your perfect sphere straight down, with no side-to-side motion.  Each bounce would be precisely straight up, and each fall would be precisely straight down.  Whether the ball bounced just once or a thousand times, it would still end up in exactly the same spot.  It won't roll off until and unless some lateral force acts upon it to make it move to one side or the other.

The reason games like Pliko can exist in the real world is only because that kind of isolated perfection just isn't possible in RL.  No object can ever be a perfect shape, not a sphere, not a cylinder, not anything.  And no force operates in isolation from every other force. The ball will never be a perfect sphere, will never have entirely uniform weight distribution, will never have the same amount of bounciness at every point on its surface, etc..  Ditto for the cylinder.  So right away, the chances of one ever being able to successfully balance on the other are next to zero.  Further, the ball will never fall straight down.  Air currents, micro-gravitational fluctuations, vibrations, electromagnetic forces, and even subatomic forces, will always cause the trajectory to vary.  So, of course, in RL we'll always see the ball appear to randomly bounce off in one direction or another when it hits the cylinder.

In SL, those chaotic factors just aren't there.  Drop the ball, and it will fall straight down, every single time.  If it bounces, it will bounce straight up, every single time.  It will always land in precisely the same spot.  Even if that spot happens to be the point of a needle, it won't roll off.

So, the kind of random "plinko effect" you might have been expecting just isn't going to happen, with just the physics alone.

 

Now here's another interesting point to consider.  Nothing in SL is actually round.  Everything is ultimately constructed from flat surfaces, facets.  What we call a cylinder is actually a polyhedron with 24 flat sides (26 if you count the top and bottom).  What we call a sphere is a polyhedron made from 528 flat triangles. Examine any scene in wireframe mode, and you'll see all this, easily enough.

sphereOnCylinder.jpg

In the above wireframe screenshot, you can see exactly what I just described.  I've colored the two objects full-bright red, to help them stand out against the background.  Even though the sphere is physical, it remains at perfect rest on top of the cylinder.  It will never fall off, unless something pushes it off.

As you can see, because the sphere has not been rotated, its polar axis is straight up and down.  It sits directly on its southern pole, the single point at which its lowest set of triangles converge.  In the absence of any outside force to tip the sphere it in any direction, the downard force of gravity will keep it perfectly balanced on this point, forever.

The cylinder, is likewise oriented straight up and down.  It's been rotated 90 degrees one axis, obviously, but this still a neutral orientation.  The southern pole point of the sphere is resting directly on top of one of the cylinder's edges.  Again, unless an outside force acts on it, it will never roll off.

Now here's an easy experiment you can conduct, to demonstrate how the physics responds directly to the faceted nature of the objects' geometry.  Rotate the cylinder clockwise one degree.  Drop the sphere onto it, and it will bounce off to the left, instead of straight down.  This is because it will be impacting on a left-sloping side of the cylinder, instead of onto the corner. Now reset everything back how it was, rotate the cylinder counter-clockwise one degree, and drop the ball again.  It impact on a right-sloping facet, and bounce off to the right.

You can repeat this a thousand times, and you'll get the same results every time, no chaos, no randomness, no Plinko effect.  The physics remain entirely predictable, each time.

 

If you want to build a Pliko board, you're going to have to script the ball to behave artificially.  The physics alone aren't going to do it.  The ball is going to have to be told to pick a random vector for its next motion each time it impacts a peg.

 

 

ETA:  It's also worth noting that even if you could get the Plinko board to work physically, you really wouldn't want to.  Physics calculations take place on the server.  The more collisions it has to deal with, the slower it runs.  Sufficiently complex physics problems can cause serious lag, and can even crash a sim.

If you want to build physics games, do it in a game engine that can handle it.  SL just isn't made for that.

Link to comment
Share on other sites

You can repeat this a thousand times, and you'll get the same results every time, no chaos, no randomness, no Plinko effect.  The physics remain entirely predictable, each time.

I'm seeing quite a bit of randomness in my experiments with SL physics.   Maybe it's the wind.

Physics could be augmented with random values applied to llPushObject if things seem too deterministic.

ETA:  It's also worth noting that even if you could get the Plinko board to work physically, you really wouldn't want to.  Physics calculations take place on the server.  The more collisions it has to deal with, the slower it runs.  Sufficiently complex physics problems can cause serious lag, and can even crash a sim.

How do combat sims function at all then,  with all those weapons and bullets flying about and colliding with things?

Even fairly quiet sims will have plenty of collisions.   We generate collisions every time our avatars walk somewhere.


Link to comment
Share on other sites


Rufus Darkfold wrote:

 

I'm seeing quite a bit of randomness in my experiments with SL physics.
  
Maybe it's the wind.


Maybe.  If you want to test that, you can script an object to return the wind vector, and see if the object behavior seems to match the readings.

 


Rufus Darkfold wrote:

 

How do combat sims function at all then,  with all those weapons and bullets flying about and colliding with things?


With the older version of Havok that SL had for so many years, combat sims used to crash all the time.  It's gotten better since the implementation of the newer version, but still, it doesn't take much to bring a sim to its knees.  Weave a handful of toruses into a piec of chanimail cloth, make it physical, and you'll see what I mean.

As for bullets, those tend to be fairly simple collisions.  For the most part, each bullet hits an object once, and then dies.  It's pretty rare that you'd end up with a situation in which a bullet will find itself bouncing back and forth between two surfaces.

 


Rufus Darkfold wrote:

 

Even fairly quiet sims will have plenty of collisions.   We generate collisions every time our avatars walk somewhere.


I'm not sure what point you're trying to make with that statement. You might as well say the fact that air is always falling onto your head is proof that it won't hurt if I drop an anvil on your head.

I'm not trying to imply that any and every collision will toast a sim.  What I am saying is that when a particular item looks like it could potentially cause problems, it's well worth considering that (especially when there are more effective ways to accomplish the same task).

Not too long ago, a sim I built for one of my corporate clients was stuck in single digit FPS for the better part of a full day, before I tracked down the cause.  Two physical objects that were scripted to fly around the sim as part of a shooting game, crashed into each other other way up in the sky, and due to their shapes, they got stuck together like jigsaw puzzle pieces.  It was a one in a million shot, but it happened.  The constant repeating collisions just from those two objects quickly overwhelmed the sim.

The same thing could potentially happen with the Plinko board.  The ball could get stuck bouncing between two posts.  Much stranger things than that have happened.  It would be much safer just to script the ball to behave in the desired manner, and leave the physics out of it altogether.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4733 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...