How can I make On Component Hit work like Event Hit?

I was trying to make a fuction that detect if my holding object hit other objects or walls, floor whatever in the scene.
The method I hold object is learned from Youtube and it base on physic constraint.
It also set the object held in player’s hand as a primitive component named “Held Object”, and it’s in player’s blueprint.

I would like to use that Held Object as the component of “On Component Hit” to detect if it hit anything but it seems not working at all.

I tried set Event Hit directly on those object and it can work(Top left hit messages).


a) both objects need generate hit events turned on.
b) on pickup bind Event from OnComponentHit in the grab function
c) unbind the event on release.

Grab

Hook up of events

Release

Inside collapsed hit reaction

Example scene with some slight touch ups of the functions (moved set current object order after grab + rotation)

Pickup with right mouse button or E

2 Likes

Thank you for your response. I managed to make it work.

Since my grabbing logic is different from yours. Somethings need a little change and I follow your logic that bind event on grab and drop functions. It functions normally and meet my expectation.