PlayerViewPointRotation() undeclared identifier and GetWorld()

PlayerViewPointRotation() says undeclared identifier, probably needs a #include, but what is it?

and…

Get World() red squiggly error says: *UWorld UActorComponent::GetWorld() const pointer to incomplete class type is not allowed. So what does it want?

For the GetPlayerViewPoint you need to include:

“Runtime/Engine/Classes/GameFramework/PlayerController.h”

About the red lines I wrote an article about the IWYU changes. In this article I also show 3 method where you can find the includes for the future. If there is still something not understandable, please report back and I’ll try to explain! <3

Thanks much. but it did not work. Will read your articles later. Thanks much again.

Oh gosh, looks like I was sleeping. In line 35 you named your rotator “PlayViewPointRotation” instead of “PlayerViewPointRotation”, guess it’s just a typo then. You can also remove the include statement with the PlayerController, that was my fault! Sorry! <3

Thanks much, guess I just needed some fresh eyeballs. Yeah I managed to do that in line 35 and line 36. Thanks much again. case closed.

Oh gosh, looks like I was sleeping. In
line 35 you named your rotator
“PlayViewPointRotation” instead of
“PlayerViewPointRotation”, guess it’s
just a typo then. You can also remove
the include statement with the
PlayerController, that was my fault!
Sorry! <3

reply

Jahn.Justin 1 min ago

Thanks much, guess I just needed some
fresh eyeballs. Yeah I managed to do
that in line 35 and line 36. Thanks
much again. case closed.