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
0
Question by RafaelCN · Oct 30, 2013 at 12:49 AM · collisiongameobjectcollider

Collider Error[SOLVED]

Hello, i think that Unity Colliders have an error when have to detect objects in high speed.

One example, im my game, i have bullets, and they are passing through my object, when is suppose to detect and destroy itself with this script

 void OnCollisionEnter(Collision collision) {    
     //detecting collision with the enemy    
     if(collision.collider.tag == "Enemy")    
     {  
         Destroy(gameObject);    
     }      
 }

Here is a picture of what's happening alt text

Comment
Add comment · Show 4
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 adnirjhar · Oct 30, 2013 at 01:48 AM 0
Share

Check if the OnTrigger is turned on in your collider.

avatar image clunk47 · Oct 30, 2013 at 01:54 AM 0
Share

He's using OnCollisionEnter, not OnTriggerEnter, just to clarify, you'd want IsTrigger to be FALSE in this case.

avatar image adnirjhar · Oct 30, 2013 at 01:58 AM 1
Share

Yeah. Thats why I said to check if he accidentally turned it on and didnt notice. :)

avatar image clunk47 · Oct 30, 2013 at 02:02 AM 0
Share

In that case, +1

2 Replies

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

Answer by clunk47 · Oct 30, 2013 at 12:56 AM

Rigidbodies moving at high speeds should have their CollisionDetectionMode set to ContinuousDynamic. The bodies that these fast movers will hit, should have their mode set to Continuous. Read the Documentation for more information. I'd personally suggest using Raycast on your bullets instead.

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 RafaelCN · Oct 30, 2013 at 01:17 AM 0
Share

Thank you @clunk47 !

avatar image clunk47 · Oct 30, 2013 at 01:27 AM 0
Share

Always happy to help. Please accept the answer of these two that helped best resolved your concern.

avatar image
1

Answer by Doireth · Oct 30, 2013 at 01:00 AM

See my answer here

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 RafaelCN · Oct 30, 2013 at 01:18 AM 0
Share

Thank you @Doireth

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

18 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

Related Questions

Collision Detection without a RigidBody 2 Answers

destroy touch the screen on gameobject in camera 0 Answers

How do I stop an immediate collision with all objects from ocuring at the entry of game mode? 0 Answers

C# Check If Gameobject is within Collider 1 Answer

How can i check if GO collided with collider starting with name (string) 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