Unlock cursor at runtime

hey all, i want to be able to right click during runtime to disconnect from the first person camera so i can interact with things and then right click again to return to normal viewing mode.
any clues on how i set this up?
thanks in advance

Dont know why this never got answered

Getplayercontroller → bEnableClickEvents and/or bShowMouseCursor they are booleans you can toggle on/off as needed either continuously or at certain times by calling a custom event or function

If this helped make sure to acceppt an answer so people who come acrosss your question on google etc. know exactly what to do since it will highlight the answer you chose as best.