Hi Thomas,
@Mou_Leo also told you a potential solution for the problem with the torque. I just want to add that, if you use Time.deltaTime
in the FixedUpdate method (or methods that get called in the FixedUpdate code block), remove it. Time.deltaTime
must not be used in the context of LateUpdate.
Regarding the problem with values in the Inspector, they are not supposed to get updated automatically just because you changed something in your code. Imagine you had hundreds of enemies, NPCs or something else using the same script. And you spent hours configuring all those game objects in your scene. Would you want to lose your work just because you made a change in the code? Probably not.
When you assign a script to the Inspector, the Inspector takes control over the fields. It just uses the initial values from your code when the component gets created.
If you need to reset the component in the Inspector to get the default values from your code, click on the three dots, then on “Reset Component”.
See also: