Now I am simulating the movement of a roulette ball. The ball is launched from an invisible rail and falls onto the side of the roulette wheel, gradually descending as centrifugal force dissipates.
The roulette wheel is shaped like the inner surface of a contact lens and it is equipped with a fence to prevent the ball from escaping.
During play, the ball falls rapidly as it loses inertia and then moves in an elliptical pattern.
When viewed from above, the ball should ideally rotate smoothly and consistently, with the ball’s motion resembling a whirlpool.
When viewed from the side, the ball should fall at a constant rate.
However, in the current simulation, the ball not only drops sharply as its inertia fades but also exhibits elliptical motion. Additionally, when viewed from the side, the ball oscillates vertically instead of maintaining a steady descent.
The only current workaround to resolve this issue is to temporarily disable the collider for the side wall of the roulette wheel. For some reason, this allows the ball to behave as expected. However, this is not a smart or ideal solution.
If you have any advice or hints on how to address this strange problem, I would greatly appreciate your input.
I don’t think that behavior is unnatural. In fact, the ball actually follows such a path.
1 Like
If the ball is not properly launched along the outer edge, I believe it would result in this kind of movement. Thank you!
As a side note, I have a life-sized mockup of this roulette. When testing with it, the ball’s trails forms a beautiful vortex, just as I expect.
I understand that there may be cases where the ball moves in an elliptical pattern, but my goal is to achieve a smooth vortex motion in the simulator.
The path of the ball should be influenced not only by the entry angle but also by the intensity of deceleration.
This is just my intuition, but I think it might become more stable if the friction is reduced.
Or, considering the spin of the ball, it might become more stable if the friction on the sidewalls is reduced while increasing the friction on the bottom surface.
Tweaking game physics to match real-world physics is incredibly difficult. You have to live with some degree of funkyness because the simulation is for rigid bodies only. Even a roulette wheel and the ball are not totally rigid, they do have some softness to them.
You did not specify the details of your setup. For instance it matters if you leave the default Rigidbody’s Drag values, if you do not specify custom Physics Materials for wheel and ball, if you do not adjust mass of the ball and re-test many times over, these kinds of things all need tweaking to see their effect and to match the expected behaviour as closely as possible. The defaults will practically never match real world expectations, even in a small confined scenario such as this.
You can also run scripts to optimize certain undesirable behaviours, such as clamping linear or angular velocities respectively adding forces as you see fit. This involves a TON of trial and error, mind you. And this is normal I’m afraid.
Best practices: change ONE value at a time and re-test. Never ever tweak two or more values at the same time. Experiment with extreme values, and all settings provided (ie physics material) to best see their effect and get a feel for how exactly they affect things. Also consider checking the Project Settings => Physics pane. For such a simple scenario it may help and is also computationally okay to raise the number of iterations.
From what I can see you’re not too far off though.
1 Like
Thank you all for your kind responses.
After checking each parameter and setting related to physics, I found that disabling "Enable Adaptive Force" in Physics settings, resulted in the desired smooth vortex motion!
This setting is related to the distribution of forces from upper objects, but I suspect that the force distribution is not appropriate when there are more than two contact points (possibly a bug?).
Thank you for your opinions.
1 Like