• 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
4
Question by ratmat2000 · Aug 17, 2012 at 06:32 AM · physics

Why does changing fixedDeltaTime create strong forces on rigidbodies?

We are building a game where we are trying to achieve a slow motion effect with rigidbodies in motion. We are changing Time.timeScale from our default of 2 to a slo-mo value of 0.01. We also change Time.fixedDeltaTime accordingly from a default of 0.02 down to 0.001. This achieves a nice fluid slo-mo effect that is very satisfying.

The problem, however, is that rigidbodies throughout our game using FixedJoints receive large amounts of force as the fixedDeltaTime value changes rapidly. By quickly toggling between a fixedDeltaTime of 0.02 to 0.001, we see objects brushing against others (with only miniscule amounts of motion) receiving large forces that cause them to explode away from each other and fly off screen.

If we change only timeScale and leave fixedDeltaTime set to 0.02, we don't see the large forces affecting our rigidbodies but the rigidbodies and some other items we update ourselves in FixedUpdate routine move jerkily compared with a fixed update of 0.001 when tileScale is 0.01.

We've tried lerp'ing between the fixedDeltaTime changes but it doesn't fix the issue.

Thank you for any help!

Andy Riedel CTO & Founder PlayGearz, Inc

Comment
Add comment · Show 8
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 ScroodgeM · Aug 17, 2012 at 06:40 AM 0
Share

possible this caused by you applying forces in FixedUpdate as constant, but on decreasing fixedTimeStep from 0.02 to 0.001 will cause FixedUpdate calls 20 times more often (1000 times a sec). so your forces should be decreased proportionally.

avatar image ratmat2000 · Aug 17, 2012 at 07:35 AM 0
Share

We aren't applying any of our own forces at all in FixedUpdate. The default physics engine seems to be creating them.

avatar image ScroodgeM · Aug 17, 2012 at 07:37 AM 0
Share

try to set low value of fixedtimestep before game run - does it works correctly?

avatar image ratmat2000 · Aug 17, 2012 at 10:12 AM 0
Share

That didn't seem to work either. Setting it lower makes the physics much more unstable even when not in "normal" mode (timeScale = 0.02).

avatar image ScroodgeM · Aug 17, 2012 at 10:35 AM 0
Share

then it's something with physics program$$anonymous$$g. cause default physics should not changed when fixedTimeStep decreased. just more CPU load.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

11 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Raycast length must be equal to the target distance 2 Answers

Physics: Is it possible to count the number of colliders hit with OverlapSphere? 1 Answer

Make car CenterOfMass change dynamically 1 Answer

If statment to check if player is within collider 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