Since the beginning of our project, we have been moving and animating both objects and camera always in Update() and/or LateUpdate() (always scaled by Time.deltaTime to compensate for framerate).
However, Physics.Raycast() no longer returns correct and reliable results when doing so - no matter where I do the Physics.Raycast() (FixedUpdate/Update/LateUpdate), it sometimes passes through objects that just moved into the path, and sometimes it works.
Now I noticed that it does work reliably when I do all my scripted animations in FixedUpdate() instead of Update() - again, independently from where I call Physics.Raycast.
So my main question would be: Is this how it needs to be done? Are you forced to do all object transformations in FixedUpdate, if you want to use Physics.Raycast? Or am I missing something, or is there a workaround?
Sometimes some of our objects (or the camera) are also animated using animations created with the Unity AnimationEditor. But when I script-animate the camera in FixedUpdate(), an object with a Unity animation will look extremely jerky. Is Animation.animatePhysics the proper way to fix this? Or is there some other way to influence the read-only value AnimationClip.frameRate (which appears to be 60 for Unity-animatinos, independent of Time.fixedDeltaTime)?