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 qbert65536 · Dec 28, 2011 at 09:38 PM · colliderplane

Mesh collider from 3d model not triggering collision with plane

I have a plane that represents a 'tar pit' ( y = 0.2 ) that I place on the terrain ( y = 0 ) that I have enemies ( y = 0 ) run over and I want to trigger an event.

I can successfully get other objects ( a cylinder representing a gun tower ) to interact with my enemies, but I can't for the life of me get anything to happen when they cross the plane.

If I move the plane at game time into the enemies, I get the debug statements from both of the OnTriggerEvents ( the enemy and the plane ) , but when the plane is npt moving I can't get any of the functions executing.

Both the enemy and the plane have box colliders with 'Is Trigger' checked, am I missing something ?

Thanks!

Comment
Add comment · Show 2
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 Noah-1 · Dec 28, 2011 at 09:48 PM 0
Share

Do you need to detect all the time they are touching the plane or only when they cross a certain point?

avatar image qbert65536 · Dec 28, 2011 at 10:05 PM 0
Share

Only when they cross a certain point

1 Reply

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

Answer by aldonaletto · Dec 28, 2011 at 10:06 PM

If the enemies are CharacterControllers, you may place a trigger volume in the tar pit - when an enemy enters the trigger, OnTriggerEnter events will be sent to both, the enemy and the tar pit.
If the enemies aren't CharacterControllers, they must have a rigidbody to be detected by the trigger, and their colliders must not be set as triggers (even because they would fall like rocks through the terrain in this case).

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 qbert65536 · Dec 28, 2011 at 10:14 PM 0
Share

They weren't character controllers.

Adding a rigid body to my enemy fixed the issue, however, I was getting OnTrigger events before between the gun tower ( cylinder that had a rigidbody ) and my enemy ( which did not have a rigid body ).

Wonder why ?

Thanks!

avatar image aldonaletto · Dec 29, 2011 at 02:41 AM 0
Share

To be detected, collisions or triggers require that at least one of the objects must have a rigidbody or a CharacterController - since the cylinder had the rigidbody, the enemy could be detected.

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is Mesh Collider possible on an animated plane ? 0 Answers

Using the UnityEngine.Plane struct, what's the best way to check if a collider is crossing said plane? 0 Answers

How to use onmouseover with inputdown? 0 Answers

Some objects falls through Plane with mesh collider(grenade) 2 Answers

Is i possible to make an instantiated object appear in that exact position, when using a plane as a collider, using Input.MousePosition? 0 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