OnControllerColliderHit bug

OnControllerColliderHit do NOT ! return anything when my character controller hit other characterCOntroller(for example: jumps overhand other controller).OnControllerColliderHit works only when im “forced” move my controller through other controller.

up :?:

sorry ,but up :shock:

Hi Andrew,

Maybe it’ll help if you describe your problem in a manner other people can actually digest. Source code, example project. Expected behavior vs actual behavior backed up by links to the documentation. Likely other people were like me and read “for example: jumps overhand other controller” and immediately hit the back button and moved on.

As Quietus mentions, you can be upping your post from now and till eternity if your post is of the nature “DoesNotWork”. To add to the expected behaviour v. actual behaviour, you should also paste any relevant script errors and warnings.

Edit:
Oh and: Up.

sorry once again

Sorry ! :sweat_smile:
Im using standart script :

function FixedUpdate() {
var controller : CharacterController = GetComponent(CharacterController);
if (controller.isGrounded) {
moveDirection = Vector3(Input.GetAxis(“Horizontal”), 0,
Input.GetAxis(“Vertical”));
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *= speed;

if (Input.GetButton (“Jump”)) {
moveDirection.y = jumpSpeed;
}
}

moveDirection.y -= gravity * Time.deltaTime;

controller.Move(moveDirection * Time.deltaTime);
}
function OnControllerColliderHit (hit : ControllerColliderHit)
{
if (hit.transform.tag==“Enemy”)
print(“hitting enemy”)

}
Enemy AI-its just static box with CharacterController instead of box collider.
I guess that it is impossible define collision between two CharacterControllers with the help of
function OnControllerColliderHit?