I am stuck with some coding. I know the problem but I don’t know how to solve it.
My wheel is turning according to the velocity.
Now I need the wheel to slowly stop spinning when not in contact with the ground.
The Ray sensor checks if there is contact with the ground.
The rotation when in contact works fine but I don’t know how to save the last value when getting off the ground and loading it into the “else” loop.
I tried to solve it before with the game logic states with almost good results (the property was already decreasing while not in contact with the ground)
But I couldn’t load the property again into the code.
The code above is without game logic states, but I don’t know how to save the last value of the velWheel variable after exiting the positive if loop.
_Desculpem a intromissão, mas estou tentando aprender, programação python, gostaria de saber se as duas formas estão corretas ou devo usar apenas uma delas e qual ?