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 Auz · Dec 08, 2010 at 01:31 AM · oncollisionentercollisions

Collision with no onCollisionEnter

Hello, I'm making a fairly simple tank game. I'm having two problems that I can not for the life of me figure out. The first is that (with no enemy ai) my shells collide with the enemy tank, however there is no onCollisionEnter called. Secondly when the ai is activated there is not a collision at all. I feel this may be related (though they may not be) and any help would be greatly appreciated. Thanks!

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Proclyon · Dec 08, 2010 at 02:09 PM

I got so fed up with not understanding collisions in my test I just made a supersmall project, built a ton of small blocks all with a permutation of Rigidbody Yes/No Character Controller Yes/No ColliderBox Yes/No (IsTrigger on Collider Yes/No)

And then I built a player block and kept slamming it into everything with ALL those functions active and a lot of Debug.Log("Player collided with this is that").

Before you know it you understand collisions in Unity. Sometimes a wall of text and some pictures is good enough, but here I would say, go use it before you lose it. I know I would have.

Some things I noticed:

Constant Force + character controller = Only torque will have any effect the rest becomes pointless to use.

Rigidbody + Rigidbody = Physical collisions only, like bowling

Character Controller + Collider = Use the special OnCollision functions or the OnControllerColliderHit(ControllerColliderhit cch){} function

Character Controller + Collider + IsTrigger = You can walk through the object but can catch the collision in OnTrigger(Exit/Enter/Stay)

Before I wall this to much , go try it out , really , it'll help.

Problems I had with collisions that may help out , all discussed and answered , except the one I answered myself:

Elevator

CapsuleCasting

General Approaches on Collision detection in Unity

and this one may be usefull Rigidbody link here

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
avatar image
0

Answer by Auz · Dec 08, 2010 at 08:51 PM

So that definitely helped a bit. I've started seeing trigger's go off when the shells pass through walls but not through the tanks. I've started to gather that there isn't a trigger that goes off when traveling through a Character Collider. If that is the case, is there anyway to go about making some variation of that collision happen without having to change the way my tanks move? This is all fairly new to me so I'm trying to quickly grasp what is going on throughout the project. If I can provide anything that will be helpful please let me know and thats for the above post. It helped make some progress happen.

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

No one has followed this question yet.

Related Questions

OnCollisionEnter not working! 0 Answers

OnCollision Works for one script but not the other? 2 Answers

get collision info from main script? 1 Answer

Can not get OnTriggerEnter and OnCollisionEnter to work!? 1 Answer

OnCollisionEnter Issues 2 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