Help pls "Set Mouse Position" Not Working Correctly

I think Do it once on Tick fix your problem or creat an Event .

Hey there

First i would like to apologize for my bad english, it is not my native language but i will try to do my best.

Ok so my problem is that the mouse spawn at the top left of the screen and I would like to center it when the game start. Whether from the Viewport, a New Window or in Standalone Game.

I tried it from the Player Pawn, from the Player Controller as well as the level Blueprint. The only way for it to work is to assign it to a Key or by using a Widget but I would like the mouse to center on the screen from the Event BeginPlay.

I insist that I want it to work with the beginplay event because I created an edge detection to move the camera
and if the mouse spawn at the top left of the screen the camera also move, which is not suitable.

Is it possible? I assume it’s possible,
but how ?

here are screens to show you what i did :

I also tested this way :


But obviously it is the same thing so the result is also the same.

Oh god yes finally!
It took my head so much that I didn’t even think about it ^^

It works perfectly, I also just tried to put a delay at 0.1 just after the Event BeginPlay and that works.

Thank you it’s been hours that I block on!