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 /
  • Help Room /
avatar image
0
Question by C0leity · Apr 03, 2016 at 02:54 PM · triggercolliderscollision detectionmeshcollider

Collision detection without convex

I want to detect collisions of very complex moving objects (about 500.000 vertices each Object - CAD models) I`m trying to solve the problem since a month and cant find a working solution.

I`ve already tried:

  • Splitting the Objects, to make them convex (like the asset ConcaveCollider) -> Too many parts and too long calculating time.

  • Raycasting Meshpoints -> Too many points.

  • ignoring the physics -> doesnt work on meshs.

  • mesh bounds -> too inaccurate.

  • ...

"Is Trigger" wihthout "convex" is exaytly what I need. But since Unity5 it isnt possible anymore. Has somebody another idea or solution? Thank you for your help.

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
0

Answer by IgorAherne · Apr 03, 2016 at 05:31 PM

We have achieved this during the physics coursework in c++ MSc. There is no easy way exposed by Unity that I am aware of, but it's totally possible.

So the idea was to detect collisions with the object which is concave and is moving.

I solved it the following way:


1) First of all, overlap the entire 500000 vert mesh into a Bounding Box to allow for some sort of broad phase check. If the incoming, possible collider is outside of the bounding box - we are definitely not colliding with the mesh, stop right there. Of course, this requires you to be in the local space of our big mesh, I talk about it in 4), later

2) since the mesh is built of triangles - store them in an Octree datastructure or better - KD binary search tree. This happens only once, during the pre-computation stage and not during the game.

3) each triangle of our big mesh can be treated as a plane - it's flat, has 3 points and has a normal.

4) since you want the mesh to rotate, before you test for collisions with its triangles, you need to bring the potential colliding objects in the mesh's local space. You do this by multiplying the incoming potential colliding object by the inverse model matrix of our big mesh (assuming the incoming object is in the world space already. Otherwise, multiply by its model matrix to bring it in world space, and THEN by the inverse model matrix of our big mesh to bring it into our mesh's local space)

5) test its triangles against the triangles of our big mesh, in the corresponding octree's section.

test if the point is behind a triangle the same way as you would test if a point is behind a plane. That is- using dot product between the plane's normal AND the vector from the plane to point. If it's negative -point is behind the plane.

Igor

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 C0leity · Apr 04, 2016 at 08:07 AM 0
Share

Thank you for your fast answer. I`m not sure whether I understand your solution. Sounds for me like raycasting?

I thnik the problem will be that I have to much points to test?

avatar image
0

Answer by C0leity · Apr 04, 2016 at 08:05 AM

Thank you for your fast answer. I`m not sure whether I understand your solution. Sounds for me like raycasting?

I thnik the problem will be that I have to much points to test?

alt text


folie1.jpg (207.0 kB)
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

61 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

Related Questions

Player is in range of an Item or Door and can Interact? 2 Answers

How do I detect a collision between two objects using Bolt? 1 Answer

Problem to Trigger sound with OVR Player 1 Answer

How do I make "selective" borders? 0 Answers

Enemy Trigger Colliders are triggering my player's trigger collider. Why? 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