Casting a Damage Event

Edit: After further testing the value of the impact normal is changing after being passed to the multicast function.

I am trying to add an impulse to my character upon death that is dependent upon the direction which they were shot from. From the weapon I create the FPointDamageEvent to store the information needed to apply the impulse.

FPointDamageEvent DamageEvent = FPointDamageEvent(Damage, LastHit, AimDirection, UDamageType::StaticClass());
LastHit.GetActor()->TakeDamage(DamageEvent.Damage, DamageEvent, MyCharacter->Controller, this);

If the damage taken was lethal my Die method is called.

/** Kills the character. */
void Die(struct FDamageEvent const & DamageEvent, AController* Killer);

Die then calls a MultiCast method, MultiDie, which is responsible for rag-dolling the character on the clients and applying the directional impulse.

void AOneFlagCharacter::MultiDie_Implementation(struct FDamageEvent const & DamageEvent, AController * Killer)
{
	if (GetNetMode() != ENetMode::NM_DedicatedServer || Role < ROLE_Authority) {
		GetMesh()->SetAllBodiesSimulatePhysics(true);
		GetMesh()->SetSimulatePhysics(true);
		GetMesh()->WakeAllRigidBodies();		
		
		if (DamageEvent.IsOfType(FPointDamageEvent::ClassID)) {
			const FPointDamageEvent* MyPointDamageEvent = (FPointDamageEvent*)&DamageEvent;
			FVector impulseDirection = MyPointDamageEvent->HitInfo.ImpactNormal.GetSafeNormal();
			GetMesh()->AddImpulse(impulseDirection * GetMesh()->GetBodyInstance()->GetBodyMass() * 100000.0f);
		}
	}
}

It is in MultiDie that I am not sure what the error is. My first issue is that the ‘IsOfType’ if statement is not evaluating to true. However, if I comment out the if statement, the values in my ImpactNormal are always the same and nearly zero. For example, ImpactNormal.Y: 2.66247e-43. I am guessing that something is going wrong when I cast to an FPointDamageEvent. Any help is greatly appreciated.

This is an old post but I ended up here because I am having the same problem.
I think what’s happening is when you put the FDamageEvent in a new storage type (Example FDamageEvent = MyPointDamage) it will downcast it. However, if you are dealing with the actual memory of the FDamageEvent -
FDamageEvent const& Event = MyPointDamage, then Event will still be a PointDamage.

In my case I’m overridiing a pawn’s TakeDamage(float Damage, FDamageEvent const&DamageEvent…) function, passing it to the same function signature of a HealthComponent, then the health component tries to broadcast that same damage information, also it stores the LastDamageEvent on the HealthComponent. Both the broadcasted DamageEvent from HealthComponent and the stored DamageEvent on HealthComponent are FDamageEvent, …but up until then it was FPointDamageEvent.