- Home /
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)
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.
Aha! This was actually happening and the problem has somewhat changed
Well if that solved your problem be sure to make the answer as "accepted".
Its not completely solved its just narrowed it down a bit :). Thanks anyway though!
Answer by AnaRhisT · Jun 20, 2010 at 05:12 PM
works great for me. u can also check with hit.gameobject.tag
make sure they all have colliders, and they're not triggered.
yeh they are. its just weird cause it works once and then not all of the other times.
Your answer

Follow this Question
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