Geting the chracters collisian overlap event in component?

hi i made a simple item sense system in a player chracter now i am trying to do it using component.
but i cant call " on component overlap " and " on component end overlap" which prevents me from using the collision to detact items . İ tried using get owner cast to player chracter and promote collision as variable but i still cant get overlap. i copied and pasted overlap it stays but its not working . is there any way i can fix or a altarnative way?

Getting the characters collision overlap event in a component typically involves utilizing a physics engine or collision detection system within the software framework. This event triggers when two or more characters or objects within the game or simulation interact and overlap spatially. Developers often implement collision detection algorithms to detect these overlaps, which can then trigger specific actions or behaviors programmed into the game logic. Optimizing collision detection ensures accurate and responsive gameplay, crucial for immersive user experiences in various applications such as gaming, virtual reality, and simulations.

If I’m understanding this correctly, you have a character that has a collider component (maybe a sphere), and you have another actor component that you want to handle logic when said collider overlaps with something

If that’s the case, then in your logic component, you need to somehow get a reference to the collider.
You can do that in a couple of different ways:

  1. Get Owner and cast to your Character BP, then from it get the collider that you want and bind events to on begin/end overlap
  2. Get owner and Get Component By Class for the class of your collider component (for example SphereCollision), and bind events to that
  3. Create a function called initialize in your logic component that takes a primitive component as an argument, then in your character’s begin play call this function on the logic component, and pass the desired collider to the function. Then in this Initialize function in your logic component, bind the relevant events