Make ACharacter bounce off the walls. Multiple OnComponentHit events problem

Hi,
There is a player actor inherited from ACharacter. Player navigates the maze some parts of wich supposed to have zero gravity. So I set BrakingDecelerationWalking = 0 and BrakingFrictionFactor = 0 on CharacterMovement.
This causes player to “float”. In order to make actor bounce off the walls I added OnComponentHit event handler for capsule component. In the event handler new velocity is calculated and set to movement component. The problem is that OnComponentHit is called multiple times while actor is near wall. It make it slide along the wall instead of bouncing. If I add some “cooldown” and ignore several consequtive events actor starts bouncing. Still in some cases it sticks to the wall. The method is not reliable.

Is there a way to improve it? Or may be there is completely different approach?

Use a Boolean to control your action. When finished you restart the variable. Something like that:

IF my var = false, I do something. While my var = TRUE, I’m not ready to do something.

I was trying to check if there was hit last frame. OnComponentHit() sets the variable and Tick() resets it.
That doesn’t work. Turns out OnComponentHit is called several times in one tick.
So now I save tick count on hit and if hit happens in the same tick it’s ignored. That seems to be working.
I guess this will also help in cases of applying damage and playing sounds.