- Home /
when is pysics.raycast used, if it is called in Update()
Hi ;) The execution order of the physics functions is asynchronous to the update functions. http://docs.unity3d.com/Documentation/Manual/ExecutionOrder.html so what happens if I call physics.Raycast() in an overwrite of Update()?
Answer by Lovrenc · Jan 03, 2013 at 05:08 PM
Phyics functions are called 50 times per second, Update is called for every frame (may that be 20 times per second or 120), and think that is what they are trying to say. Phsics event are asynchronus to Update and you should take care of phsics related stuff in FixedUpdate.
Raycast function has nothing to do with that. It is just a static function and it is executed proceduraly the moment you call it.
EDIT: Would be great if some unity comunity wisemen actually check if what i wrote is true. After all i am total noob.
Your answer
![](https://koobas.hobune.stream/wayback/20220613090329im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
execution order of Destroy and Physisc.Raycast 1 Answer
Changing the color of a block when a player walks on it? 2 Answers
Game not running properly on slow machines (low fps) 1 Answer
Is there a way how to use both Animate Physics and Unscaled Time update modes in animator ? 0 Answers
I have been struggling with a GUI window with table data for over a week now. What am I doing wrong? 1 Answer