What is a Fixed Update?

I asked a question a while ago:


And the answer I got was to put my camera movements in a fixed update. How would I do that. And does someone have a better answer for my previous question?

more ▼

asked Jun 23, 2010 at 12:23 AM

avatar image

358 18 15 37

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Update is called every frame that's drawed. FixedUpdate is called at fixed intervals (you can define the interval in Edit -> Project Settings -> Time -> Fixed Timestep). It's used internally for Physics and a good place for putting things that should be framerate independent. For example if you made a simple counter and put it in Update it will count slower when framerate drops, not when put in FixedUpdate.

more ▼

answered Jun 23, 2010 at 01:33 AM

avatar image

Jaap Kreijkamp
7.2k 46 64 113

FixedUpdate is pretty much just for physics; use Time.deltaTime in Update to make things framerate-independent. There are several drawbacks to using FixedUpdate for anything else: if you decide you need a different physics framerate, then your code timing changes even though it's not related to physics (trust me, I've been there). Also, Unity tries to make FixedUpdate run at 50 fps or whatever even in low fps situations, which is generally the opposite of what you want. So most of the time you should keep FixedUpdate functions lightweight and only for physics-related code.

Jun 23, 2010 at 02:34 AM Eric5h5

I found out the problem. It is the damping on my smooth follow script. But if I turn the damping off I get a lot less natural effect. Solution??

Jun 23, 2010 at 02:56 AM Pirate___man

Can I also put a random range for the fixedUpdate() to execute?

May 19, 2013 at 05:36 AM dicraft
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jun 23, 2010 at 12:23 AM

Seen: 19180 times

Last Updated: May 19, 2013 at 05:36 AM