Further reading
The following are some useful resources to learn more about controlling Unity object positions and movements:
- Learn more about 2D and 3D character controllers at https://docs.unity3d.com/Manual/character-control-section.html.
- Learn more about the local-to-world-space direction
TransformDirection(...)
method at https://docs.unity3d.com/ScriptReference/Transform.TransformDirection.html.
Throughout this chapter, we have kept to a good rule of thumb:
“Always listen for input in Update()
.
Always apply physics in FixedUpdate()
.”
You can learn more about why we should not check for input in FixedUpdate()
in the Unity Answers
thread (which is also the source for the preceding quote from user Tanoshimi) at https://answers.unity.com/questions/1279847/getaxis-being-missed-in-fixedupdate-work-around.html.