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
2
Question by moghes · Jul 29, 2013 at 07:36 AM · collisiontriggerconvexmesh collidersprimitive colliders

Trouble with mesh colliders

Hello everyone,

I need to detect collision/trigger with 2 mesh colliders and making them convex does not work for me.

I have a wire and a loop, the user has to guide the loop through the path/circuit of the wire without touching it. check the attatched picture.![alt text][2]

First problem is that, I am obliged to use mesh collider for both, (the path gets more curly and its not a solution to use many primitive colliders)

since collision is detected bwtween 2 mesh colliders, only it they are convex.

Making them convex results in a collider just like a box collider, check the second picture alt text, (the red part is a separate mesh and has the collider attatched). In this case I am stuck, can't detect dollision? Then I came up with an idea of adding child primitive colliders to the loop (the grey donut) since it was simpler and easier than adding to the circuit! check the third picture , I am not sure if this is the right way to do because it sucks, if I had the loop an another shape (like heart or start), will I make 50 shpere colliders to make up a star?

Waiting for hints :)

[2]: /storage/temp/13638-untitled-2.jpg

untitled-2.jpg (370.1 kB)
meshcol.jpg (202.3 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by SanX91 · Jul 31, 2013 at 03:46 AM

How about a very simple solution like this :-

Instead of attaching so many colliders.. just add one sphere collider within the empty space of the donut.. Then check your conditions on collision exit or trigger exit... I mean most of the times the wire would be inside the collider.. But on exit, it actually touches the ring.. GameOver.. On collision exit or trigger exit, just stop the movement, so that it does not pass through the mesh... I believe it might just work....

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 moghes · Jul 31, 2013 at 07:15 AM 0
Share

Thumbs up, Sounds a good solution.. the only confusing part to me is when the user pulls the loop(donut) it will appear like being pulled but never get out of track, so rotation will be changed but only movement has to be stopped. I will give it a try and reply back.. I liked the trigger exit idea!

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

17 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

Related Questions

How to add to a 3D object's length through code? 1 Answer

Overlap point of 2 kinematic colliders 1 Answer

How to add the right amount of points when my player destroys a gameobject? 0 Answers

Receiving information about getting hit by a Raycast 2 Answers

How do you execute Trigger-collider collision only in one gameobject? 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