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 JA_555 · Nov 24, 2014 at 10:27 AM · colliderspeed

Triggers not working because of speed?

Hello, I've been trying to figure out why my colliders are not working. The moving object (cube) has a rigidbody that is not kinematic, and it has a box collider of its own Not set to trigger.I have a wall that only has a mesh renderer, a mesh filter and a box collider set to trigger. So why won't it work? This is the script on the wall:

 function OnTriggerEnter (other : Collider) {
 if (other.gameObject.tag=="new"){
 //if (other.gameObject.CompareTag=="new"){
 Debug.Log("object passed");
 pass +=1;

I think it is because of the speed. The script on the cube makes it go 1000f, so my question, is: is my collider not working because of the speed? Thanks,

P.S. The rigidbody is set to discrete detection.

Comment
Add comment · Show 1
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 sumit9236 · Nov 24, 2014 at 10:33 AM 0
Share

change collision detection mode - discrete to continuous Dynamic

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by troien · Nov 24, 2014 at 10:41 AM

Well, if the problem is ineed due to the high speed. This post should help you further.

Sinse it includes how you can detect whether this is the case. And the things you can do to resolve this problem.

As @sumit9236 pointed out, changing the rigidbody's collisionDetectionMode to ContinuousDynamic might help aswell.

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 JA_555 · Nov 24, 2014 at 11:55 AM 0
Share

changing the detectionmode didn't help, and according to the other post, he mentioned that the detection happened if it was going at a slow speed. I changed my scripts to create a slow object, but detection did not happen. $$anonymous$$y objective is to have the wall count how many object go through it. Perhaps there is another way?

avatar image troien · Nov 24, 2014 at 01:36 PM 0
Share

How do you move your cube? The Rigidbody reference page states that you should do this in FixedUpdate ins$$anonymous$$d of Update. (To prevent all sorts of problems, maybe some linked to yours).

And is the tag of the other gameobject "new"? :p

According to the setup you gave me, there couldn't really be a problem that I know of other then that your cube moves to fast. For which the answers given in the post I linked still work best. (Reducing te Fixed Timestep being the easiest).

I tried your setup in a test scene, where the only way I was able to not get the log was when I moved my cube to fast or when I forgot to set the tag of the cube :p

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

Ideas for detecting collision speed with trigger? 2 Answers

Increase speed of object that enters OnTriggerEnter 1 Answer

How to move an object back/forth on a set path? 2 Answers

OnTriggerStay weird behavior 0 Answers

Internal collisions 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