Hi Im just starting unity today was wanting to know how come I wont get collision report with my Model? Im just moving it around in a room then when it hits a wall I make it change vel. It doesnt even call this function which is weird. This is what the function looks like
function OnCollisionEnter (collision : Collision) {
if (collision.gameObject.name == “Top Wall”)
{
movement = moveDirection * moveSpeed + Vector3 (0, 0, -2);
movement *= Time.deltaTime;
}
if (collision.gameObject.name == “Bottom Wall”)
{
movement = moveDirection * moveSpeed + Vector3 (0, 0, 2);
movement *= Time.deltaTime;
}
if (collision.gameObject.name == “Right Wall”)
{
movement = moveDirection * moveSpeed + Vector3 (-2, 0, 0);
movement *= Time.deltaTime;
}
if (collision.gameObject.name == “Left Wall”)
{
movement = moveDirection * moveSpeed + Vector3 (2, 0, 0);
movement *= Time.deltaTime;
}
// Move the controller
var controller : CharacterController = GetComponent(CharacterController);
var flags = controller.Move(movement);
}