Unity 5 State Behavior with Physics.raycast

I added a behavior script to a jump animation.
I added a raycast in OnStateUpdate to check for landing spots so I can complete the animation.
Is this is a bad idea?
Should I be doing any physics in these scripts.
I understand that raycasts are fixedupdate only but I liked the idea of keeping the state update separate for each animation that has a script.

You can always set your animator update mode to AnimatorUpdateMode.AnimatePhysics, since all the state machine behaviour (SMB) are called directly by the animator all your SMB callback will start to get called on FixedUpdate and should work pretty well with physics

That been said if you only do raycast it should work with the normal update mode. If you take a look a the doc there is a note about this

Perfect Thanks. I had forgotten about the animate update mode. Since only raycasting I will use normal updates. All I have been reading says ALL physics in fixedupdate :slight_smile: