Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by ahbreezy · Aug 24, 2017 at 11:13 PM · physicsupdatetimephysics2dfixedupdate

How often does the internal physics calculation get called?

For this example say my Fixed Update time step is 30hz (0.033s) and my frame rate for the update call is 60hz (0.0166s).

How often will the internal physics calculation happen that occurs after the Fixed Update call?

Is it attached to the Fixed Update call so that it only happens at 30hz or will it run at however fast the game loop is running to keep up with the frame rate update calls?

I am asking this because I apply a force in my fixed update and I am logging my position of my rigid body in my update call and i would expect there to be a few log statements where my position hasn't moved because the internal physics calculation hasn't taken place unless they are not actually tied together.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by creganjordan292 · Aug 24, 2017 at 11:21 PM

By default, physics operations occur once every 0.02 seconds, or 50hz. Each FixedUpdate call is bound to the physics engine, and a change of the physics timescale will result in a change of the speed of the FixedUpdate.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ahbreezy · Aug 24, 2017 at 11:27 PM 0
Share

Yes I understand this. I guess my question is the physics engine bound to fixed update? Because I do not understand how my rigid body can have two different positions in between fixed update calls if the physics calculation only gets called on that time interval. Thanks!

avatar image creganjordan292 ahbreezy · Aug 24, 2017 at 11:33 PM 0
Share

The physics engine is not bound to FixedUpdate(), but rather vice versa. If you go to Edit > Project Settings > Time you will see an option for "Fixed Timestep" which Unity's documentation describes as "A framerate-independent interval that dictates when physics calculations and FixedUpdate() events are performed." It does not explicitly state that FixedUpdate() is dependant on the physics engine, but is implied as the FixedUpdate() call is part of a physics engine update.

avatar image creganjordan292 ahbreezy · Aug 24, 2017 at 11:34 PM 0
Share

What you are most likely observing is interpolation that is performed by the rigidbody that approximates (interpolates) the position based on previous movement data. Disable that and see if that has any effect.

avatar image ahbreezy creganjordan292 · Aug 24, 2017 at 11:42 PM 0
Share

Yes it was interpolation I thought I had turned it off but it appears not. Thanks!

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

113 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is there an equivalent of Time.frameCount for physics updates? 1 Answer

Does AddForce use Time.deltaTime or TIme.fixedDeltaTime or it depends on whether it is being used in Update() or fixedUpdate()? 2 Answers

Use frame time for physics update: is it ok? 1 Answer

Slow motion all but one - yet another round, hopefully the last 6 Answers

FixedUpdate vs. Update for instantaneous ForceMode's 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges