@Everyone here. It may be usefull.
BAM beta:
https://ravarcade.pl/beta/BAM_v385.zip
Inside is spinnerExtDemo.
- added "Ext" for spinners. Same way as always to create that object. Simpler version: xBAM.CreateAllExt
- spinnerExt.
setOmega x,y,z --- you can spin spinner from script with give speed on selected axis... If spinner is on table verticaly (like on spinnerExtDemo, rotation = 0 or 180) set only X axis. If horizontally (rotation = 90 or 270), set only Y axis. If rotation is something different use trigonometry (x: speed * cos(rot), y: speed * sin(rot)) or something like this. I added this to have reliable way for testing.
- spinnerExt.
setAdvDamping maxDamping, minDamping, exponentDamping, minSpeed, maxSpeed.
now you can create simple damping chart:
View attachment 48178
(Exp = exponentDamping. Something very similar to "gamma" in colors).
I'm not sure if exponentDamping will be useful.
On run spinnerExtDemo with F9 (debug window) and look at script. Probably all will easier to understand after you play with it little bit.
Keys:
T - spin spinner with starting speed = 100. This is more reliable way that try to hit it with ball.
On debug window it will print in _Hit event number of spin and num of physics frames after you press T. This should give you good info how different value impact result.
Y,H,N - will set standard "FP" params, where there is only one angular damping set to 0.575 (Normal), 325 (Lose), 750 (Tight).
You should try "T" few times. You will see, that it not give exactly same results. Also any other value gives "wired" results.
U,J - inc/dec minDumping
I,K - inc/dec maxDumping
In my tests i'm keeping exponentDamping = 1.0. But you may try to find better value
minSpeed = 5.0, maxSpeed = 100.0 (this is not ball speed! it is rotation speed of spinner. In my test max speed i get after ball hit was ~ 170).
Now some info:
Number of rotations default FP:
Norm (0.575/0.575) = 8 in about ~200 frames (0.8 sec)
Lose (0.325/0.325) = spins without end. rotation speed after ~13 spins falls to speed, when i expect it will stop, but it will probably never stop.
Tight (0.750/0.750) = 6. Once for while spinner stays upside/down and wobbles (Triggers _Hit over and over)
My own tests:
0.025/0.575 = 40 in ~1100 frames (4.2 sec)
0.275/0.575 = 14 in 400 frames (1.5 sec)
0.425/0.575 = 10 in 240 frames (1 sec)
0.675/0.575 = 7 in 170 frames
0.975/0.575 = 5 in 110 frames
Imho this way you can easily tweak spinner to get desired rotation.
Right now i don't have solution to prevent spinner stuck "upside/down".