Deproject screen to world is saying not enough parameters

and this is set under my .H file

GetLookDirection(FVector2D ScreenLocation, FVector& LookDirection) const;

Any help? :frowning:

Hey @DanM, can you help Marc out?

All the best,
Part of the team

Full header and cpp please - .cpp - .h

Thank you for your time.

In your header file, in line 29 you declaare a boolean value with name 'DeprojectScreenPositionToWorld’
And later in your source file in line 67 you call function with the same name.

Rename variable in your header file at line 29 to something different.

Also the title of your problem is a bit misleading.
The error does not say that there is not enough parameters.
It says that expression that comes before () has to be of a pointer to function type.
Since you earlier declared name ‘DeprojectScreenPositionToWorld’ as boolean, and later tried to call it as a function, but compiler sees it not as a boolean

Will try that now! And I should of clarified, that’s what Unreal compiler told me.

Thanks for the solution! I didn’t realize that I had it declared in my header file -.-

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

Privacy & Terms