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 PaxNemesis · Dec 06, 2011 at 01:20 PM · physicscolliderspenetration

Actual collision happens before the visual collision

Hey there,

Situation: To avoid physics jittering ( from when colliders try to "settle" on top of other colliders ) we have set the "Min penetration for penalty" to 0.05( http://unity3d.com/support/documentation/Components/class-PhysicsManager.html ), which is recommended, but this again leads to us needing larger collision boxes. So when we try to calculate when something hits the ground or other objects, the actual collision will happen before the visual collision...

( If an object is on top of another object( standing still ), these objects will also penetrate each other at a depth of 0.05 units if the collider is the same size as the objects. So it has nothing to do with the objects moving to fast. ;-) )

Question: Are there any way to work around this problem? And is the increasion of the collider the right way to fix the "Min penetration for penalty" increase?

Any solution or hints to what to do would be greatly appreciated. :D

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 cregox · Dec 07, 2011 at 01:53 PM 0
Share

Not sure what you're asking here... But "bigger collision boxes" is usually a bad fix for fast collision issues: http://answers.unity3d.com/answers/170956/view.html

avatar image PaxNemesis · Dec 07, 2011 at 02:04 PM 0
Share

When we set the "$$anonymous$$in penetration for penalty" to 0.05 and have the colliders the same size as the objects, these objects would sink into each other. And the way we have solved this is to increase the colliders of the objects. This again will create the early collision problem.

Are there any better way to solve this then using larger colliders? If not, how should I deal with the "early" collision problem? :)

avatar image cregox · Dec 07, 2011 at 03:05 PM 0
Share

Yes, raycasting as I pointed in the link. Which, in its turn, points to several similar questions and same answer. $$anonymous$$aybe using that will set your $$anonymous$$d in another direction to solve all other issues that might be deriving from this. If not, come back here and edit the question. It also helps if you can add some working code of the issue.

avatar image PaxNemesis · Dec 07, 2011 at 04:01 PM 1
Share

I appreciate your input here. :) But the thing is; a raycast will collide with the collider, not the visual object, so this would not work. And this has noting to do with objects moving to fast for the physics system to react. What happens is when an object is sitting on another object(not moving at all), and the "$$anonymous$$in penetration for penalty" is set to 0.05 ( http://unity3d.com/support/documentation/Components/class-Physics$$anonymous$$anager.html ) the objects will be penetrating 0.05 units into each other.

At this point there are no actual working code for solving this problem, I have tried to use the OnCollisionStay function, http://pastebin.com/QTPhuAtu , but this isn't giving any satisfactory results.

avatar image cregox · Dec 07, 2011 at 06:27 PM 0
Share

Hmm... I tried fooling around a lil bit with the $$anonymous$$in penetration for penalty but still couldn't see the jitter... And it's also not good Jessy's similar question is still unanswered. Is that the same issue? What I could notice is that, when you pause the and go frame by frame I can see different behavior on collision when changing its value... So maybe there's something there that can be done. Have you tried fooling with LateUpdate?

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.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Physics Possibilities?: Angles, Penetration, Exceptions 4 Answers

Friction Issue with Multiple Colliders Touching 0 Answers

THIN objects can fall through the ground? (AMAZING SOLUTION) 2 Answers

Wheelcolliders stuck in ground 0 Answers

Why is it so fast to move objects with collider collisions? 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