|
Hey all. I'm using the OnControllerColliderHit function with the ThirdPersonCharacterController script. There is one type of object, a rope, that I made where I trigger the collision within the function like this: if (hit.collider.gameObject.tag == "rope") { ropeGrab = true; Physics.IgnoreCollision(this.collider, hit.collider); } I need to do the ignore collision because if I don't, the rope swings around like crazy, and I can't get the behavior I want. All the movement on the rope is done elsewhere in the script when ropeGrab == true. The problem is that the first 2-3 times I hit the rope, it triggers the condition correctly. But after that, hitting the rope in the same exact spots does not trigger this condition any longer. It's almost like the collider on the rope just stops working. I've tried this with multiple ropes, and the same thing happens with each rope, where you can hit each one a few times, and then no longer. I've put in a debug message, and the processing doesn't even make it INTO the OnControllerColliderHit function when you hit the rope after it stops working. You can still collide with all other objects though. Anyone have any ideas?
(comments are locked)
|
