Hello everyone
I’m on a project to make a kind of simulations of planetary gears
as I can not make them react to each other with the colliders
I try to do it with a Script that calculates the speed of each part as a function of the input speed and the role that each party shall perform
in this case, the sun is the entrance, the carrier is stationary, and the ring is the output
the calculation for ring ratio would look like
-S/R = -52/92 = -0,5652173913043478
and for planets ratio would look like
-S/P = -52/20 = -2,628260869565217
Now, I have the speed of the input into an int, so to be, for example 45 the velocyty for each part would look like
VR= 45*-0,5652173913043478 = -25,43478260869565
Vp= 45*-2,628260869565217 = -118,2717391304348
but for some reason Unity does not use numbers with decimals all full, and thus, do not get the proper spin on each gear
this had me upset
the script works so fine but, the end is not that all,
any idea how to fix this?
instead of doing it this way
Will there be another?
for example, it occurs to me that not as a function of its speed but in terms of its angle of rotation, but not really seriously need to fix this.
I appreciate all the help you can give me
