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"

unable to open NavMovementComponent?

Hey, I'm really out of Options here.`ACharacter* MyCharacter = UGameplayStatics::GetPlayerCharacter(this, 0); MyCharacter->GetMovementComponent()->MovementState.bCanJump = false; `

The second line is producing following errors

alt text

The engine doesn't seem ( i assume) capable of opening NavMovementComponent.h where MovementState is defined. What could be the reason? If I try to inlcude the Header, it Fails... I appreciate every Kind of healp :)

Product Version: UE 4.16
Tags:
errors.png (54.6 kB)
more ▼

asked Oct 19 '17 at 10:41 AM in C++ Programming

avatar image

hallohalloxd3
3 1 1

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

3 answers: sort voted first

You should include the main files (.h) not the (.generated) ones. Main headers already include the generated ones.

more ▼

answered Oct 19 '17 at 04:21 PM

avatar image

staticvoidlol
2.6k 95 41 111

avatar image hallohalloxd3 Oct 19 '17 at 04:39 PM

neither of the files could be opened

avatar image staticvoidlol Oct 19 '17 at 05:47 PM

Then it means you probably didn't include enough details for the compiler to find the files, e.g.

 #include "Runtime/Engine/Classes/GameFramework/PawnMovementComponent.h"
 #include "Runtime/Engine/Classes/GameFramework/Character.h"
 
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Have you included the headers for both Character and MovementComponent? Seems like it firstly can't resolve the Character reference.

more ▼

answered Oct 19 '17 at 02:32 PM

avatar image

staticvoidlol
2.6k 95 41 111

avatar image hallohalloxd3 Oct 19 '17 at 04:16 PM

Thanks for the Response: I tried to include "Character.generated.h" but it's producing the following: alt text

In Addition to this I added every "MovementComponent.generated.h" i found, but ist producing the same error when I don't include character.generated.h...alt text

unbenannt.png (14.4 kB)
includes.png (10.7 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Great, it's finally working. Thank you for the help (thought it was a stupid mistake, but it surprises me every time again how easy it was afterwords)

more ▼

answered Oct 20 '17 at 11:57 AM

avatar image

hallohalloxd3
3 1 1

(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