Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 TennoHack · Oct 18, 2017 at 08:22 PM · collisionrigidbodynot workingrigidbody-collision

RigidBody collision is so bad SOMETHING is wrong! What did i do?

I mean seriously, they're so unbelievably, mindbogglingly bad that one rigidbody box collider can't even handle 10 rigidbody mesh colliders without horrible collision issues. I explain my problem in detail in this video. Note that my problems are not due to scripting most likely, because this issue is with Colliders and Rigidbodys. (and i know that this isn't actually how they're suppose to be interacting)

https://youtu.be/pM2t-xX8WlA

Comment
Add comment · Show 1
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 TennoHack · Oct 18, 2017 at 10:21 PM 0
Share

Can someone please help me with this? I kinda only post here when i'm desperate for answers and as of yet i've never gotten a single reply on any post i've ever made.

1 Reply

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

Answer by Bunny83 · Oct 18, 2017 at 11:15 PM

You do some really strange things here. I list them in the order of severeness:

  • First of all you should only attach a rigidbody to objects that actually move / are supposed to move. Your ground looks like it's a static object, so remove the rigidbody.

  • If you want a rigidbody that can move but should not be affected by collisions or generally external forces you should make the rigidbody kinematic. Constraining all rotation and movement axis is a bad idea as it just adds unnecessary overhead.

  • Moving rigidbodies should have primitive colliders whenever possible. If you really need a mesh collider you can only use convex mesh collider. Non-convex mesh colliders can't be used on rigidbodies, just on static geometry.

  • We don't see your used physics material settings so any sort of sliding is the result of your materials.

I don't really see any particular strange things. Your moving rigidbody doesn't have any drag so once it's moving it won't stop on it's own. It could stop due to friction but this depends on the two PhysicsMaterials involved in the collision.

Comment
Add comment · Show 4 · 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 TennoHack · Oct 18, 2017 at 11:44 PM 0
Share

Well i've been reading a whole lot about Rigidbodys here on answers and first of all it seems to be that a $$anonymous$$inematic rigidbody is basically a rigidbody that is there, but disabled, nothing can interact with it and vice versa, secondly if something doesn't have a rigidbody then a few people said that no rigidbodys can interact with it, same with kinematics, I already have materials on both of the objects interacting, but I'm pretty sure when it did work in the past, i was using no materials at all. AND concave colliders, which i explained in the video i'm nolonger using, so from my point of view i did what everybody would say is wrongwrongwrong, and it worked no problem, and then i fixed it so it was all correct, and now theres tons of problems. The moving rigid body, whether it has drag or not, (i'll look into what adding drag does in a second) it should not be moving in this random direction for no reason, they just scoot in a see$$anonymous$$gly random direction, every single one, in the same exact direction, at the same exact rate, not to mention the unholy collision...

Well i removed the rigidbody from the ground collider and set the drag of the physics objects to 1 and that seems to be exactly the solution i needed, everything seems to function as expected now, although every time there is a perfect seemless transition from one grounds collider to another's, bricks will want to fall through, but i solved that by having one big boxcollider in the chunkloaded area. But is there any workaround for not being able to use concave colliders?! That's a HUGE problem in my case and they couldn't have removed the functionality without a better alternitave or workaround, you say i should keep my colliders as simple as possible, with concave colliders it would have been a single primitive with 14 faces, not it has to be 5 primitives with many more faces... across 5 primitives... not to mention the ground, don't tell me that for accurate collision i would need a mesh collider for every single unit.

avatar image Bunny83 TennoHack · Oct 19, 2017 at 12:20 AM 0
Share

Then you read the wrong "sources". You should check the reputation of those people. A rigidbody by definition is something that "moves".

Unity basically has two types of rigidbodies:

  • $$anonymous$$inematic Rigidbodies

  • Non-kinematic Rigidbodies

Normal (Non-kinematic rigidbodies) are driven by the physics system. They have mass, velocity, inertia and angularVelocity. Rigidbodies in general need to have one or multiple colliders, either on the same gameobject or on a child. Those colliders can only be primitive colliders or convex mesh colliders. However the performance of the primitive colliders is in general better and more stable.

Collisions can only be detected by non-kinematic rigidbodies. $$anonymous$$inematic Rigidbodies can't detect collisions but they can wake up non kinematic rigidbodies on collision so the normal rigidbody can actually detect the collision. $$anonymous$$inematic rigidbodies are ment for moving platforms, elevators, doors and other moving things which are controled by scripting only.

So if a resting non kinematic rigidbody is hit by a moving kinematic rigidbody the non kinematic rigidbody will wake up, detect the collision / intersection and responds to this collision.

Note that a $$anonymous$$eshCollider is always a mesh. Primitive colliders are not called primitive because they have a less complicated structure but because they do actually represent a mathematical volume. A normal $$anonymous$$eshCollider does not represent a volume but just a collection of surface triangles. A convex $$anonymous$$eshCollider does actually represent a volume, though it's much harder to calculate collisions with them. Have a look at this page and scroll down to Compound Colliders. Using several primitive colliders (Box, Sphere, Capsule) is actually better for performance and you could even model a basic concave shape.

avatar image TennoHack Bunny83 · Oct 19, 2017 at 12:33 AM 0
Share

How much of a performance difference would you say that primitive colliders have over mesh ones of the same size and complexity? I'm trying to judge what would be worth replacing, do you think i could accurately replace the collision mesh of the single brick with primitives only? would that increase performance? What about the ground? Seeing as how there are 1024 individual caps would it be more or less demanding to have the primitives over the one mesh collider per ground?

oh lord there's such a lack of shapes. Why is there no triangular collider or a triangular prism which is what i need

EDIT: so inorder to recreate my brick with primitives, i ended up using a total of 10 colliders per brick, it's very low quality masking, and it's about 2/5ths slower then using my 5 mesh colliders, is there any other way to get accurate optimized collision?

Show more comments

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

133 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 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 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 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 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 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 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 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 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

Knock down moving target ridigbody from collision. 1 Answer

Problem with Rigidbody control script! (collision with perpendicular walls problem) 1 Answer

How to make an object 'push' my character out of the way upon collision? 0 Answers

Extremely Buggy rigidbody collisions [URGENT, DEADLINE 3 DAYS AGO!!!!!!! C#] Please answer. I can't figure it out! (As of 1 Answer) 2 Answers

collision detection on child rigidbodies 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