Hi,
I am working on a platformer and my character collides with my power ups but they don’t enter the OnCollisionEnter function untill I hit them from one spacific point. Anyone have any ideas why? My character has a character controller, a capsule collider, and is being moved by the move function. I have tried adding a rigid body to it but the result stayed the same even when it was kinematic. My powerup is a sphere with a sphere collider, and a rigid body. I have tried having both with rigid bodies, both with kinematic rigid bodies, both with neither, and some other variations that I don’t remember.
here is the collision code as of right now in the Powerup’s script:
void OnControllerColliderHit(ControllerColliderHit Hit)
{
print(“collision contoller”);
if (Hit.gameObject.name == “Player”)
{
print(“Collision with powerup COntroller collider”);
}
}
void OnCollisionEnter(Collision _Collider)
{
print(“collision”);
if (_Collider.gameObject.name != “Cube”)
{
print(“collision with powerup”);
}
}
I want the collision to be handled here so I haven’t put anything in the player for it. I will try that next but I wanted to see if maybe I was missing something.
Thanks in advance for the help.