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 MrAkroMenToS · Nov 18, 2013 at 05:38 PM · collisionterraintrigger

Terrain doesn't collide with my mesh

I have a player with mesh collider and a terrain with terrain collider. My player has rigidbody attached wich is Kinematic. In the mech collider, the IsTrigger is checked. I have an other cube, with cube collider.

If i go through the cube, in the log i see "Colled", but if i go through the terrain, i cant see anything. My code is here:

 void OnTriggerEnter(Collider col) {
         Debug.Log("Colled");
 }
 
 void OnTriggerExit(Collider col) {
     Debug.Log("Exit");
 }
 
 void OnTriggerStay(Collider col) {
     Debug.Log("Stay");
 }

I want to see Colled in my Log, if i go through the terrain. Thank you for the help!

Comment
Add comment · Show 6
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 MrAkroMenToS · Nov 19, 2013 at 01:25 PM 0
Share

I tried tonns of solutions, i cannot solve the problem!

avatar image gajdot · Nov 19, 2013 at 01:27 PM 0
Share

Nvm, I tought your terrain has the mesh collider. Did you attached this script on the object you want to fire it?

avatar image MrAkroMenToS · Nov 19, 2013 at 01:40 PM 0
Share

As i wrote, it worked with the cube collider.

avatar image MrAkroMenToS · Nov 19, 2013 at 01:56 PM 0
Share

It worked, but if i use Convex mech collider, i should use box collider too, so it is not necessary to use mesh collider, but i want. How can i trick the system?

avatar image MrAkroMenToS · Nov 19, 2013 at 02:07 PM 0
Share

I solved! Thank you for help gajdot, you should make it as answer, and i'll tick it for a good answer.

Show more comments

1 Reply

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

Answer by gajdot · Nov 19, 2013 at 01:44 PM

Try to make you mesh collider(your object) a convex mesh. The problem probably is that you are trying to collide two mesh collider(the terrain collider is a type of mesh) which I remember right it won't collide, but when you are hitting the cube you have a primitive which fires correctly. So try to make your mesh collider convex(you can tick in the inspector) or try to replace with a primitive collider and try it out that way.

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

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

Detect collision/trigger between two body without rigidbody? 3 Answers

Trigger script does not work. 1 Answer

How to make a death-on-collision script for Air Strike Starter Kit? 1 Answer

Safe area from enemies 1 Answer

Dynamic terrain (Safeground) 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