Why am I getting this error?

Trying to work on touch controls (which is proving to be nightmarish at this point), running into “no instance of overloaded function “APlayerController::GetInputTouchState” matches the argument list” for this code:

float t1x, t1y;
    
playerController->GetInputTouchState(ETouchIndex::Touch1,  t1x, t1y, true);

I followed the requirements to a T, I don’t understand what it’s trying to tell me is wrong.

the error is telling you " with the types you gave me, i can’ t find a function. either types or number is mismatching or i dont understand them."

last bool is passed by reference. that’ s the super thing about ue having source available.

float t1x, t1y;
bool res;
playerController->GetInputTouchState(ETouchIndex::Touch1,  t1x, t1y, res);

also that function seems a bit low level to me. that sort of code is likely to cause pains during the whole lifetime of your project.
i’ d make sure theres no other simpler way. you could get an event or use enhanced input system to give you an event.

Oh my ■■■■■■■ god. I’m not telling it if it’s pressed, it’s telling me if it’s being pressed! I’m going to go to sleep now. Thank you for responding even though it was so dumb.

1 Like

i’m glad it helped. i get you. that’ s why i ensure to sleep when i’m tired instead of pushing.
it’s not a dumb question, someone will surely benefit from the knowledge later.

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