Understanding Issues... again :)

Sorry guys but i dont want to cheat myself… For me it wasnt so clear…
So i got question…
Do we need to treat this OnHit definition as a magic box and dont analyze too much…?
Beacuse if i dont understand how things works i really cant use it…

void UTankTrack::OnHit(UPrimitiveComponent * HitComponent, AActor * OtherActor, UPrimitiveComponent* OtherComponent, FVector NormalImpulse, const FHitResult&Hit);

Can someone explain why we need so many arguments in this function…

1 Like

I’m sorry I’m so late to answer, but it’s because you’re essentially overriding the function when you set up the OnHit delegate binding. The engine calls the function expecting certain parameters, so you have to fulfill those parameters.

All of those parameters are self-evident as to what they are there for, but you don’t have to use them if they’re not necessary.

Privacy & Terms