Exec57
(Exec57)
1
Hello
The AddDynamic function seems to not works.
This is my projectile blueprint
This is my character blueprint
The overlap event is not trigger when a bullet collide with the player. However the OnBeginOverlap in blueprint works.
I have also the “OnHit” in c++ and it works contrary to OnBeginOverlap.
I am totally confuse and I don’t know what to do to fix this. Someone can tell me what I’m doing wrong please.
Sorry for my English.
Is your component activated?
Did you Initialize it?
Exec57
(Exec57)
3
Yes
OnHit working in c++ and OnBeginOverlap working on blueprint
Exec57
(Exec57)
4
I have to use blueprint to do the job.
But I don’t like that. Please someone can tell me what I miss to trigger the event correctly in c++.
I have switch yesterday to UE 4.18 and it doesn’t fix the problem.
Thank you
Exec57
(Exec57)
5
I fix it !
I put MeshComp->OnComponentBeginOverlap.AddDynamic(this, &ABulletProjectile::OnBeginOverlap);
in the BeginPlay function instead of the constructor.
That’s weird because MeshComp->OnComponentHit.AddDynamic(this, &ABulletProjectile::OnHit);
works in the constructor.
1 Like