Let me describe my problem first, I set FirstPersonCharacter as my initial GamePawn when I press [Play] in unreal editor, then I have a car in my scene, my FirstPersonCharacter can run near the car, and after press [E], Possess in blueprint node will set GamePawn to my carVehicle, so I start use keyboard drive my car in the game world. But I have some object in my world which will interact with my FirstPersonCharacter, for example, I have a crystal object, when character get into it, it will popup a widget in the viewport which allow me to change material of crystal through the widget, when I get away from the crystal, the widget will disappear. But I do not want this happen when I driving my car near the crystal, so my idea is, after OnComponentBeginOverlap in Crystal Blueprint, there is a [DETECT-CURRENT-PAWN-TYPE] step, then if my current pawn is not assoiate with Car? (I do not how to say) , then creat the widget, if my current pawn is FirstPersonCharacter, do not creat the widget.
So my question is, how to achieve this? And how to center mouse cursor and freeze game camera movement when widget created, thanks a lot