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
1
Question by Rasmus · Nov 03, 2010 at 10:08 AM · physicssleep

Physics preventing objects to go into sleep?

Is there a way to prevent a certain object to fall into sleep (physiX)? I'm aware of the costs etc. involved, but with one object should not be the big problem?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by AquaGeneral · Nov 03, 2010 at 12:34 PM

Use Continuous Collision Detection. You can read more about it here: http://unity3d.com/support/documentation/Components/class-Rigidbody.html

Set the "Collision Detection" setting in the object's rigidbody component to "Continuous Dynamic".

Comment
Add comment · Show 3 · 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 cregox · Jan 28, 2011 at 10:48 PM 0
Share

what if that doesn't work?

avatar image cregox · Jan 28, 2011 at 11:32 PM 0
Share

here: if (rigidbody.IsSleeping() ) rigidbody.WakeUp(); from: http://forum.unity3d.com/threads/4519-$$anonymous$$aking-a-rigidbody-never-sleep

avatar image AquaGeneral · Feb 13, 2011 at 06:35 AM 0
Share

In that case, the static objects which are going to be colliding with the "Continuous Dynamic" object need to be set to "Continuous".

From the documentation: Continuous - Used for objects which the Continuous Dynamic detection needs to collide with.

BTW, that forum topic is almost four years old, before Unity had the support for Continuous Collision Detection.

avatar image
1

Answer by Anxo · Aug 04, 2014 at 11:00 PM

I understand this question was from 2010 but I jut had to look it up and this question was the first one I ran into, so I thought I would contribute.

To adress AquaGenerals Answer: Use Continuous Collision Detection is designed for objects to not pass through each other when moving at a high velocity. As state in the documentation (which might have changed since 2010)

Solution: Rigidbody now has a property called "sleepVelocity" which sets the threshold under which the rigid body will fall asleep.

If 0 velocity is not low enough and you need to keep it awake even then, you can use a if(rigidbody.isSleeping)rigidbody.wakup(); call in the fixedupdate, but that might get a little heavy if you have it on lots of objects as they all will have to run a check on every fixed frame.

sleepAngularVelocity The angular velocity below which objects start going to sleep. (Default 0.14) range { 0, infinity }. sleepVelocity The linear velocity below which objects start going to sleep. (Default 0.14) range { 0, infinity }.

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

1 Person is following this question.

avatar image

Related Questions

2D 360 degress platformer example needed 0 Answers

How to stop rigidbody.sleep() 2 Answers

do rigidbodies fall asleep at the same time? 1 Answer

Why are my Rigidbodies not sleeping? 0 Answers

Rigidbody not sleeping 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