Sorry for the noob question, but how exactly can I detect and measure the magnitude of an impact on the player capsule?
I’ve tried OnComponentHit but this only triggers if the character is moving. Yes, I’ve ticked ‘Simulation Generates Hit Events’ and ‘Use CCD’ on the player character capsule.
I’ve tried OnComponentHit but this only triggers if the character is moving.
If the event doesn’t trigger, then there’s nothing to measure.
Just in case it’s not clear enough in my initial post for some reason, the problem is that the hit event does not trigger if my character is standing still. I need a way to measure the impact of a collision from something like a moving platform or a strike from another character even if my character is standing still.
The only workaround that seems to work is to create a second collision capsule, enable ‘Simulate Physics’ on it, and constantly move it to the position of the original collision capsule on Event Tick.
This question is resolved but wanted to add that if your character standing still and hits on capsule triggering is an expected behaviour of CMC works since sweeps only done during movement. However if you set “SimulationGeneratesHitEvents” on character capsule the phsyics objects should create a hit event.
Besides correct response of HitMagnitude is resolved over here
If you are doing a kinematic collision to standing still player then you can simply propagate impact from object to player collision. Think on that scenario the player doesn’t have to be an observer. If this is something like a projectile or similar impulse/damage anything can be already communicated to player via existing events, damage or custom systems so that the impact is authored by the owner not the observer.