x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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?

alt text

alt text

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

Product Version: UE 4.16
Tags:
more ▼

asked Jul 12 '17 at 08:12 PM in C++ Programming

avatar image

Jahn.Justin
26 8 12 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Jul 13 '17 at 05:58 AM

avatar image

Jahn.Justin
26 8 12 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

more ▼

answered Jul 12 '17 at 08:31 PM

avatar image

Ninjin
4.1k 88 38 152

avatar image Jahn.Justin Jul 12 '17 at 09:43 PM

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

avatar image Ninjin Jul 13 '17 at 04:02 AM

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

avatar image Jahn.Justin Jul 13 '17 at 05:55 AM

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.

alt text

success1045.png (35.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question