• 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 Tim.Holman · Oct 06, 2011 at 05:53 PM · collidermeshtriggersphere

Mesh collider trigger

I'm trying to trigger an event when my golf ball goes through an object. I've created a customized object using Maya, imported the object and gave it a mesh collider, then checked "is trigger." The problem is, the ball doesn't actually set off the trigger! I've checked to make sure the obect is tagged correctly. The golf ball has a sphere collider on it as well as a rigid body.

The only way to set off the trigger is for me to set the customized object to "convex". Even then, the golf ball doesn't go through it, it just collides with it (a result that I do not desire). Isn't convex only neccessary if BOTH objects have mesh colliders? Or do I need to use convex if I have one mesh collider and one sphere collider? Does anybody see a mistake or something I'm overlooking here?

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 Tseng · Oct 06, 2011 at 10:54 PM

This depends. You haven't told what shape your mash has? Is your mash a kind of a ring?

If it's a ring and your ball shoots through the mesh, then it's obvious, why it doesn't trigger, because the ball doesn't touch the mesh at all, when it goes exactly through the hole. When you check "convex" collider however, the hole disappears and becomes "solid" (you can see this, when you closer inspect it, you'll notice that the green collider lines go though the middle of your mesh).

Convex basically closes holes. I'll post an image of an example soon

edit: alt text

As you can see, the convex mesh is much simpler than the actual mesh and will even trigger on areas where no mesh is there.

Comment
Add comment · Show 2 · 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 syclamoth · Oct 07, 2011 at 01:26 AM 0
Share

Golf balls are kind of tiny. Do you think the problem might be because of it 'phasing' through between physics steps?

avatar image Tseng · Oct 07, 2011 at 03:44 AM 0
Share

Dunno, but you can check this in the frame-by-frame feature. If it passes through the collider from one frame to the other, without touching the collider, it's probably the too fast thing.

What shape is the mesh you're using?

avatar image
0

Answer by Tim.Holman · Oct 07, 2011 at 10:19 PM

My mesh is a totally unique object that was custom built to fit into an oddly shaped sand bunker (I'm working on a golf mini game). There are no holes in the mesh as mentioned by Tseng. I will look into using the frame by frame feature to figure out if it is in fact moving to fast. If this is the case though, wouldn't setting the Collision Detection (under rigid body) to continuous fix the problem? Or perhaps continuous dynamic?

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Can't click gameobject when over another trigger? 1 Answer

Box Trigger and Mesh Collider on one object. 1 Answer

Sphere with collider entering the flat surface 2 Answers

OnTriggerEnter is not running! Need help with collision. 2 Answers

check when a projectile that is a trigger hits a mesh that is also a trigger 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