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 Jake 7 · Jul 02, 2011 at 01:34 AM · rigidbodycollidertriggeristrigger

Is Trigger Collision Problem

So when my rigid body character jumps onto a box that has "Is Trigger" unchecked, it collides with the box and can stay on top of the box. But when I switch "Is Trigger" to be checked, my character moves right through the box, it seems that the box loses its collider. Is there a way to keep the collider and have "Is Trigger" checked? I want my character to stay on the box for 2 seconds then have the box be destroyed using OnTrigger function, but it does't collide with the box when "Is Trigger" is checked.

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
Best Answer

Answer by testure · Jul 02, 2011 at 01:44 AM

That's the whole point of a trigger. If you want 'triggered' functionality but still have collision, don't mark it as a trigger and use the OnCollisionEnter method to perform whatever triggered behavior you're looking for:

http://unity3d.com/support/documentation/ScriptReference/Collider.OnCollisionEnter.html

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 Jake 7 · Jul 02, 2011 at 01:57 AM 0
Share

Wow, thanks I didn't think of that, I'm pretty new to unity.

avatar image testure · Jul 02, 2011 at 02:16 AM 0
Share

Yeah, triggers are used specifically when you don't want any collision- or want to handle the collision manually. For example, you could use a trigger to spawn enemies when the player enters a certain zone, or you could trigger an event or cutscene to happen, etc.

And technically, a collider is just a trigger than has collision detection code built-in. Sometimes you'll want very very simple collision detection, and can simplify the behavior by setting it as a trigger and handling it yourself.

Lots of options.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Physics Possibilities?: Angles, Penetration, Exceptions 4 Answers

A Collider problem. 1 Answer

Rigidbody bounce or character controller istrigger issues 0 Answers

Is Triggered Collider Issue 1 Answer

Unity 2D Trigger Detection is not working. 6 Answers


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