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 vividhelix · Jul 22, 2013 at 04:43 PM · fixedupdatecollisiondetectiondragrigidbody

Problems with DragRigidBody.js

I'm using the DragRigidBody.js script from Standard Assets. For the most part the script works fine, however when trying to drag it through a wall it starts jittering around (rather than sticking to the wall).

It looks like one frame the object will go partially inside the wall then the next frame it goes outside of the wall where it should be in the first pace.

At times depending on the speed of the drag parts of the dragged object (ragdoll) will go through the wall completely and get stuck on the other side of it.

I tried messing with the collision detection type (both continuous options) but that didn't fix it.

Am I missing something? I was wondering if it's ok that the script does all this physics work in Update, should it be FixedUpdate?

Comment
Add comment · Show 4
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 robertbu · Jul 22, 2013 at 04:45 PM 0
Share

Try:

Edit/Project Settings/Physics

Set $$anonymous$$in Penetration For Penalty to 0.0.

avatar image vividhelix · Jul 22, 2013 at 05:06 PM 0
Share

That didn't fix it :(

avatar image vividhelix · Jul 23, 2013 at 11:09 PM 0
Share

I agree the spring setting seems to be making the most difference, but has a cost in perceived responsiveness. Can you make your comment into an answer so I can accept it?

avatar image robertbu · Jul 23, 2013 at 11:46 PM 0
Share

For my tests, the Solver Iternation Count made a big difference. I believe this setting is only used for joints, so if you don't have joints elsewhere, it might be something to consider. I converted by comment into an answer.

1 Reply

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

Answer by robertbu · Jul 23, 2013 at 06:45 AM

I played a bit. I did not find a solution, but I found three things that improved the behavior:

Go to Edit/Project Settings/Time. Reduce the Fixed Timestep to 0.01 or below.

Select the object the DragRigidbody script is attached to and reduce the Spring setting some...35 to 45.

Goto Edit/Project Settings/Physics and reduce the Solver Iteration Count. Try a value of 3. Note this may have an adverse impact on your physics elsewhere.

Comment
Add comment · Show 1 · 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 vividhelix · Jul 23, 2013 at 11:49 PM 0
Share

For future reference, this does improve things but does not fix it completely - it basically increases the maximum distance the drag handle can be behind the wall before the jitter starts (easiest tested in non-maximize screen mode in unity and drag mouse all the way to the side of the screen).

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

15 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

Related Questions

Stop Object From Ignoring Collisions - Pick Up Rigidbody 0 Answers

Problems with clicking an object with my script 0 Answers

DragRigidbody Not Working Properly 2 Answers

how to instantiate an object every second? 2 Answers

What's FixedUpdate 2 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