- Home /
Collision Detection with certain object using CharacterController(C#)
Hi How would I detect collision between a capsule(player) and a block(floor) in C# using a Character Controller instead of a rigid body. Iv been looking around and could Not find anything. I decided to to go To Unity Script References and found this. I have used C# for XNA so I would Like to keep using C# for now. All I would Like to happen is if the capsule is colliding with the block then print out something like "Capsule is colliding". Thanks
Unity Script Reference
void OnControllerColliderHit(ControllerColliderHit hit) {
hit.controller.detectCollisions = false;
}
Your answer
Follow this Question
Related Questions
CharacterController causing characters to fly around screen 1 Answer
attached.Rigidbody isn't working with a ChactacterController? -1 Answers
collision flags not playing nice with rigidbodies 0 Answers
UnityScript to C# conversion help? 1 Answer
How to fix the position of a character when grabbing a rope? 1 Answer