Can't Access Engine Functions

No matter what I try, whenever I try to use function: UGameplayStatics::SuggestProjectileVelocity(…)
or enum:
ESuggestProjVelocityTraceOption::DoNotTrace
I get the error:
error C2653: ‘UGameplayStatics’: is not a class or namespace name
error C2653: ‘ESuggestProjVelocityTraceOption’: is not a class or namespace name
error C2065: ‘DoNotTrace’: undeclared identifier
error C3861: ‘SuggestProjectileVelocity’: identifier not found
(my code is exactly the same as code in the video)
What am I doing wrong?
Thanks

Assuming you are using 4.16 you need to include the header for UGameplayStatics
#include "Kismet/GameplayStatics.h"

4 Likes

Thank you for this I forgot that I needed the #include. You were of a great help!!!

Privacy & Terms