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
0
Question by iPedro · Sep 30, 2011 at 02:49 AM · collisioncollisiondetectionspherecollider

2 small spheres colliding not sending trigger

  • Unity 3.4

  • Min Penetration for Penalty = 0

It seems my two spheres won't detect a collision unless they collide directly at the center point of the collider.

  1. The bullet sphere has a scale of 0.25, 0.25, 0.25

  2. The asteroid sphere will only detect collision at the center of the sphere if it's scale is less than 1.5, 1.5, 1.5

If you see the attached image the yellow (bullet) sphere passes right through the green (asteroid) sphere. If they collide right at the middle of the green sphere (the center of the green cross) then the collision occurs correctly.

Is this a limitation of the engine? Can I fix this or do I just have to make all my spheres bigger (not a fix)? Any help would be greatly appreciated.

Thanks.

alt text

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

3 Replies

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

Answer by iPedro · Sep 30, 2011 at 06:00 PM

Thanks guys for your good ideas. As it turns out the problem was the the bullet sphere was slightly off the z axis (-0.454 or something) and as result it was going just underneath the asteroid sphere at the sides but making the collision if it was hit dead on.

The moral of the question: Always check your axis first :-P

Thanks again

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
avatar image
0

Answer by aldonaletto · Sep 30, 2011 at 03:12 AM

The collision occurs when any part of one collider touches the other. I suspect your problem is the speed: since collisions are verified periodically (at the FixedUpdate 20mS cycle, I suppose) maybe one object is before the other in one cycle, and after it in the next, so no collisions are detected. You can modify it changing the rigidbody.collisionDetectionMode: set to CollisionDetectionMode.ContinuousDynamic in the fast moving object, and to CollisionDetectionMode.Continuous in the target object. This spends much more time than discrete collision detection, so use it only when needed.

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
avatar image
0

Answer by jonas.du · Sep 30, 2011 at 09:15 AM

There are different ways to solve your problem,

  • the rigidbody.collisionDetectionMode as mentioned by aldonaletto

  • lowering the physics time-step, this has performance issues

  • use a raycast to detect collisions, example script from the unifycommunity wiki

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Collision between two sphere game object 1 Answer

Collision detection general approaches in Unity3D for C# 1 Answer

How to detect an object inside another object? 1 Answer

Need help with collision detection 1 Answer

In-game pickup not moving towards player after being collected 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