SpawnActor with Template does not Tick
If i use :
Then ClonedActor has it's BeginPlay() method called and it's Tick( float DeltaTime ) called at some interval. That's fine and my cloned actor floats just like any AFloatingMyActor created by hand in the "world outliner".
Now if i want to use a template actor with the FActorSpawnParameters structure in order to recover all the values in the UPROPERTYs of a AFloatingMyActor created by hand in the "world outliner" which reference is called CurrentActor:
Then ClonedActor has it's BeginPlay() method called and it's Tick( float DeltaTime ) is never called !!! ClonedActor->CanEverTick(); // resolves to false even though the constructor of AFloatingMyActor contains PrimaryActorTick.bCanEverTick = true; That's my main problem actually while i try to learn UE4.
I try to clone actors with C++ because our teacher said we better learn UE4 via C++ and looks like there's no way in UE4 to make C++ actor Asset.
Bonus oddity that would be cool to sort out :
Strangely i have to position the ClonedActor at CurrentActor->GetActorLocation() because the template actor gets moved to the position of the spawned actor. Then if i want my template actor to not move i have to put my clone at template position. The documentation says that the FVector passed to SpawnActor is the position of the spawned actor, not that the template actor gets moved too !! And it does that anyway.
Thanks for help.
asked May 11 '15 at 01:48 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here