Call to SetIgnoreMoveInput gives error

I want to disable any input movement for the character while performing an animation.

STEP 1:
I have found in the API documentation the function SetIgnoreMoveInput that is in the APlayerController class and is public. I use it in this way:

MyController* MyPC = Cast(Controller);
MyPC.SetIgnoreMoveInput(true);

Obviuosly MyController inherits from APlayerController.
But this gives me an error “left of .SetIgnoreMoveInput must have class/struct/union”,

STEP 2:
I suppose after this I have to get a notification from the anim to understand when it is finished to enable the input again, is this possible?

#Answer

MyController* MyPC = Cast(Controller);
if(MyPC) MyPC->SetIgnoreMoveInput(true);

#Summary

With pointers you use the → operator, and you should always check whether a pointer is valid before doing this

#Tutorial

I have a tutorial on the nature of C++ pointers and UE4 usage here
http://forums.epicgames.com/threads/973803-Tutorials-Entry-Level-UE4-C-Overview-Q-amp-A?p=31662405&viewfull=1#post31662405

Rama

Oooops! Very stupid error. Thanks.

When I resolve an issue for you please check mark the answer so that Epic knows it is resolved too :slight_smile: