- Home /
Question by
Disaster · Oct 21, 2010 at 11:01 AM ·
physicsrigidbodycharactercontroller
Character Controller collision speed
I have a bunch of blocks which I want interact with when they collider with my Character Controller. Here is the code I am using:
function OnControllerColliderHit(hit : ControllerColliderHit) { renderer.material.color = Color.blue;
if(hit.gameObject.tag == "Block")
{
var block;
block = hit.gameObject.GetComponent("Block");
block.collide();
}
}
It works, but it's quite slow in computing the collision, there is about a half second delay before the block's collide() method is called.
Is there a faster way to check for collisions with rigidbodies and a character controller?
Comment
Your answer
Follow this Question
Related Questions
ConfigurableJoint Anchors and nested RigidBodies 2 Answers
Why is my object tilting when moving? 2 Answers
Error on checking collision or code desync? 0 Answers
Prevent player from "Running Over Top Of" specific colliders. 0 Answers
Creating a SIMPLE car. 1 Answer