Yet still block all the other actors.
What I’m trying to do is making an object explode using Apex when hit by the projectile and throw all the bits and pieces around - yet I also don’t want it to move a single pixel when e.g. I press my character against it, likewise I also want my character to be blocked by it.
One solution is setting linear dampening to something like 10000 and it works except the target actor wouldn’t throw its parts around at all when struck by the projectile, just crack.
In projectile’s OnHit function I also tried to do it like this:
if (UDestructibleComponent* DComp = Cast<UDestructibleComponent>(OtherComp))
{
DComp->SetLinearDamping(0.1f);
DComp->ApplyDamage(100.0f, DComp->GetComponentLocation(), GetVelocity(), 25000.0f);
}
e.g. setting linear damping back to “explodey” only when the projectile hit is registered - but that setting is being ignored - I guess it’s updated only at the end of the tick and that tick isn’t coming fast enough or something?
So how should I solve this?