GetActorForwardVector() and GetActorRotation() being reset in Tick

Hi there,
I’m having a weird issue where when I call GetActorForwardVector() and GetActorRotation() in Tick they always display their default values but after calling UpdateLookDir() which rotates my character towards the mouse position it seems that both values get updated correctly but then in the next frame in Tick they get reset back to their default values although UpdateLookDir is the only function controlling my character rotation.
I added logs to print the value before and after my function call in Tick and you can see that the ones printed before the function call always have the same default value also the forward vector drawn in red always has the default value as it is being drawn before the function call, (you can also the character rotation in the transform that it is never reset to R(0,0,0)). Code provided down below

YT video showing play mode and logs: 2023 03 20 13 34 32 - YouTube


I can’t reproduce this on my end with a minimal version of that. Is there a way I can take a look at your project?

That would be very helpful, here’s the repo: https://github.com/zzakarya0/ZiKo- (It’s not the latest but I believe the bug is still there),
BaseCharacter.cpp file: https://github.com/zzakarya0/ZiKo-/blob/main/Source/Ziko/Private/Characters/Player/BaseCharacter.cpp

Well so far I’ve had no luck understanding it…

I’ll try a couple more things over the weekend.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms