Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by sandworm · May 16, 2012 at 09:55 PM · collisionphysicspauseexplosion

Physics explosion when pausing during collision

I have a pause button that sets fixedDeltaTime and Time.timeScale to 0 and back. If I pause right when one object collides with another, when I unpause, they go flying at far more than the original force.

Anyone know why this is happening?

Comment
Add comment · Show 6
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 Berenger · May 17, 2012 at 02:12 AM 0
Share

Not worth an anwswer, but try setting those variables to a very small value ins$$anonymous$$d of 0, like 0.00001

avatar image sandworm · May 17, 2012 at 04:13 PM 0
Share

Thanks, I tried that. Didn't work, but I found that not changing the fixedDeltaTime at all while pausing with Time.timeScale did the trick. Why was I under the impression that fixedDeltaTime had to be 0 as well? Could have sworn I read that on the forums somewhere.

avatar image tnetennba · May 17, 2012 at 04:15 PM 1
Share

yeah you only need to change the timescale to effectively pause the game.

avatar image tayl0r · Jul 19, 2012 at 05:38 PM 0
Share

I just had the same problem, it is because the Unity documentation says to also lower the fixedDeltaTime.

http://docs.unity3d.com/Documentation/ScriptReference/Time-timeScale.html "If you lower timeScale it is recommended to also lower Time.fixedDeltaTime by the same amount."

I'm assu$$anonymous$$g they mean to only do this if your timeScale is NOT 0, but unfortunately they don't mention it! An easy mistake to make.

avatar image sandworm · Jul 19, 2012 at 06:20 PM 0
Share

Correct, the Unity docs are misleading here.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by jaybinaryspace · May 27, 2013 at 04:34 AM

Hi, Also had this issue just now. The way I fixed it is... when pausing, first get your objects velocity, then set isKinematic=true. When you unpause, set isKinematic=false and set velocity to your previous value.

Hope that helps. Regards, Jay

Comment
Add comment · 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

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

9 People are following this question.

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

Related Questions

Exploding two gameobjects from the center of an collision 1 Answer

How can I make my physics objects stay frozen (eg in mid-air) until touched by another object? 1 Answer

How does Angle of collision affect velocity? 0 Answers

Using Raycasts to change the X and Y position of a moving GameObject? 1 Answer

Checking for Collisions Before GameObject Creation 3 Answers


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