Jump to content

Odd physics problem: Physical ball spins in place on some surfaces


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

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

Recommended Posts

The basics:

* Rez a box, make it big enough to roll a ball around (10x10m maybe)
* Rez a sphere, make it physical (no other changes)

Simple enough set-up.

What I cannot for the life of me figure out: In some cases, the ball will roll just fine if you walk into it. In other cases... it slows, suddenly stops and spins in place. I see no rhyme or reason to its behavior? What am I missing?

Size of the ball doesn't seem to make a difference, size of the prim doesn't seem to make a difference, neither does mesh or prim or physics shape. No scripting involved. The behavior is consistent per instance though. If I rez said ball on a surface where it'll roll fine, it'll ALWAYS roll fine. If I take the EXACT SAME prims to inventory and rez them elsewhere, the ball may or may not fail, spinning in place after rolling a short distance. I even have a stretch of road where it works fine one one segment... and fail and spin as soon as it crosses over to the next segment.

Help? Please? De-mystify? :)

Link to comment
Share on other sites

I've been trying to replicate what you say about it spinning in place, with little success. The closest I can get to what you say is if I don't walk directly into into but hit it a glancing blow at one side, it seems to me that I then go off at a slight angle and the ball moves far less and simply spins a little, which I suppose is expected?

 

ETA

I think I might have seen what you're describing. If I walk directly into the sphere it behaves as a football might, and bounds on ahead of me a short way, but if I get it on a side, it actually goes a short way to one side or the other at almost 90 degrees to my line of travle, and makes a little odd twirl at the end of it's movement rather than the travel just petering out.

I found it hard to walk or even charge at it because my avatar would obscure the sphere as I neared it, and SL doesn't let you ramp up your speed, you're either walking or running. For this reason it was hard to precisely strike it at different position away from the centreline to see what happens. Have you tried making a second object such as a pole or croquet mallet strike it with a precise velocity and angle?

Edited by Profaitchikenz Haiku
Link to comment
Share on other sites

the SL physics ball works the same as a RL ball

if we don't hit the ball in the center (center meaning that our avatar bounding box front is at a 90 deg angle to the center of the ball)  then we put spin on the ball (as Prof mentions). A way to see if our avatar is hitting the ball in the center is to use the viewer Front View camera

if the ball rolls straight down an incline object but then spins when it passes onto the next incline then check the physics shape of the next incline object. If they are not perfectly aligned then the ball can get spin put on it

if the incline objects are perfectly aligned then it can be server lag. For some tiny micro time the next incline object collision is not detected and the ball begins to fall due to gravity, and then the incline object is detected and the ball will pop as it is forced out of the now present object. That pop can put spin on the ball

 

 

Edited by Mollymews
(.. bounding box ..)
Link to comment
Share on other sites

Assuming that OP knows how physics are supposed to work, one possible explanation for an object "spinning in place" could be a dropped packet / object update. Since all motion is interpolated client-side, it might be possible that the viewer is sometimes stuck repeating the last moment before the object stopped, causing it to spin regardless of actual physics behavior.

Edited by Wulfie Reanimator
  • Like 1
Link to comment
Share on other sites

With the help of some friends the issue has become a little clearer - and more repeatable, though also more mysterious.

Easy steps to reproduce:
* Rez a cube, make it big enough to roll a ball around (I just did a 64x64 but we also confirmed this on a 10x5)
* For repeatability, rez the Beach Ball from the library (it's scripted to bounce on touch which makes it easier to trigger the issue)
* Touch the ball (just tap it, it'll bounce and get stuck)

From this point on, the ball will act really strangely, not rolling anymore. If you run into it, it'll just skip weirdly. Definitely not expected behavior.

To switch back to expected behavior:
* Edit the cube (floor) and toggle its physics to "Convex Hull" and back to "Prim"
* Toss the ball with your mouse (pushing it with walk/run should also work at this point)

As soon as you tap it, triggering the scripted bounce, it'll get stuck again. Please note that "scripted" isn't a necessity to trigger the bug, it just makes triggering it more consistent. You can also trigger it by tossing it, or by running into it, just less consistent. The key to triggering it seems to be the "bouncing" part.

From here on out it gets weird.

Rez another cube (or anything else actually) and link it to the floor cube. Et voila. Problem gone for good. As soon as you link anything to the floor the issue disappears. It doesn't even matter which order you link it. The ball will roll just fine on the previously problematic cube prim.

 

Link to comment
Share on other sites

4 hours ago, Wulfie Reanimator said:

Assuming that OP knows how physics are supposed to work, one possible explanation for an object "spinning in place" could be a dropped packet / object update. Since all motion is interpolated client-side, it might be possible that the viewer is sometimes stuck repeating the last moment before the object stopped, causing it to spin regardless of actual physics behavior.

I thought about this and replicated it with friends on different continents and different viewers. As I am on Linux without access to Windows that's usually the first thing I test, as Linux is essentially unsupported, has no Havok and Linux clients are going the way of the Dodo.

  • Like 1
Link to comment
Share on other sites

2 hours ago, Jenni Darkwatch said:

Rez another cube (or anything else actually) and link it to the floor cube. Et voila. Problem gone for good.

Now I've actually seen what should happen I realise I was seeing your problem right from the start, I just didn't have great expectations.

Link to comment
Share on other sites

8 hours ago, Mollymews said:

the SL physics ball works the same as a RL ball

if we don't hit the ball in the center (center meaning that our avatar bounding box front is at a 90 deg angle to the center of the ball)  then we put spin on the ball (as Prof mentions). A way to see if our avatar is hitting the ball in the center is to use the viewer Front View camera

if the ball rolls straight down an incline object but then spins when it passes onto the next incline then check the physics shape of the next incline object. If they are not perfectly aligned then the ball can get spin put on it

if the incline objects are perfectly aligned then it can be server lag. For some tiny micro time the next incline object collision is not detected and the ball begins to fall due to gravity, and then the incline object is detected and the ball will pop as it is forced out of the now present object. That pop can put spin on the ball

I know it should, and does under some circumstances. In the test circumstances, it doesn't... that's the problem. I'm aware of physics alignment. Spin is fine - but it just gets stuck, without ever leaving the prim it's on. At this point I am fairly sure something fishy is going on with the physics between ball and anything else.

Your post gave me an idea though. I hadn't tried this with a tilted floor prim... and it triggers too, making the ball slide reaaaaaallly slow-mo down that slope. Again, not expected behavior, though funny to watch. If need be, I can record a video of the different behaviors.

Link to comment
Share on other sites

6 hours ago, Jenni Darkwatch said:

Rez another cube (or anything else actually) and link it to the floor cube. Et voila. Problem gone for good. As soon as you link anything to the floor the issue disappears. It doesn't even matter which order you link it. The ball will roll just fine on the previously problematic cube prim.

i can confirm this behaviour. I ran some tests on Plum sandbox. Linked prims - no problems. Single prim - odd behaviour as you describe. Linden viewer Second Life Release 6.4.14.556118 (64bit) on Windows 10

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...