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 ROM · Jun 20, 2010 at 05:04 PM · collisioncollideriphonehittest

Only detecting collision from the bottom.

So I'm currently using this to detect a collision between a character and a block:

function OnControllerColliderHit (hit : ControllerColliderHit){
        print("Called it");
}

My problem is i'm changing gravity half way through. It only detects collisions with the floor and not with the ceiling. If gravity starts upside down and him on the ceiling then it still doesn't detect the ceiling and yet its not a problem with the ceiling blocks because if i move them underneath the character then it detects collisions with them. I've therefore drawn to the conclusion that it only detects collisions with the bottom half of the character.

Does anyone know how I can solve this (I've tried rotating the character, still only detects floor collisions)

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
2

Answer by Tetrad · Jun 20, 2010 at 05:26 PM

If all you're doing is printing to the console, make sure you don't have the "collapse" option turned on in the console. It collapses duplicate messages to prevent spamming.

Comment
Add comment · Show 4 · 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 AnaRhisT · Jun 20, 2010 at 05:27 PM 0
Share

oh really? good to know :)

avatar image ROM · Jun 20, 2010 at 06:02 PM 0
Share

Aha! This was actually happening and the problem has somewhat changed

avatar image Tetrad · Jun 20, 2010 at 06:08 PM 0
Share

Well if that solved your problem be sure to make the answer as "accepted".

avatar image ROM · Jun 20, 2010 at 06:11 PM 0
Share

Its not completely solved its just narrowed it down a bit :). Thanks anyway though!

avatar image
0

Answer by AnaRhisT · Jun 20, 2010 at 05:12 PM

works great for me. u can also check with hit.gameobject.tag

Comment
Add comment · Show 3 · 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 ROM · Jun 20, 2010 at 05:18 PM 0
Share

how odd. any idea what could be wrong?

avatar image AnaRhisT · Jun 20, 2010 at 05:25 PM 0
Share

make sure they all have colliders, and they're not triggered.

avatar image ROM · Jun 20, 2010 at 05:27 PM 0
Share

yeh they are. its just weird cause it works once and then not all of the other times.

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

Detecting collisions between blocks? 3 Answers

How to Prevent a Script From Overriding Colliders? 1 Answer

HELP!! OnCollisionEnter is not working when i built it out on IPHONE! 0 Answers

How to make an object 'push' my character out of the way upon collision? 0 Answers

Player to Door Collision and Animation 3 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