stride icon indicating copy to clipboard operation
stride copied to clipboard

Editor camera stutters/does not process inputs

Open Eideren opened this issue 7 years ago • 4 comments

Keys held are sometimes ignored or processed half a second later when controlling the editor camera, it can show up on every other input or won't for multiple minutes. Sampling inputs through 'Input.IsKeyDown' in a game build works as expected.

Mouse inputs seems to suffer as well, seemingly missing frames or inputs when rotating the camera. I fiddled with the editor camera's input-handling code (removing cases where it would exit out before hitting 'UpdateCameraAsPerspective'), I forced the camera to rotate automatically by increasing it's yaw inside the function mentioned before and capturing a video of it next to my moving cursor, there were indeed frames (sometimes up to 6 in a row) captured where the camera wouldn't rotate but the windows cursor would move. The video captured was at 60fps, I couldn't find the editor view's framerate since RivaTuner flickers for some reason( perhaps related to the view implementation inside wpf? ) but if it is vsynced it would probably be at 144hz to follow my screen's refresh rate ?

While capturing the video through OBS, my gpu and cpu where under minimal load, rivatuner wasn't running and my web browser was idle. When running a single camera build of the animation sample RivaTuner reported ~900 fps so it's unlikely that performances are a concern.

Is something wrong with how the camera 'MicroThread' created through 'Game.Script.AddTask' is scheduled in editor ?

Is this issue on my end only ?

Eideren avatar Aug 11 '18 01:08 Eideren

I notice this problem too. When I move the camera forward with the WASD keys, it seems to continue moving even after releasing the keys for random periods < 1sec. Just overall laggy camera operation in the editor.

phr00t avatar Jan 26 '19 02:01 phr00t

Fixed by #359

xen2 avatar Feb 05 '19 02:02 xen2

Re-investigating this as #713 was only a workaround and relied upon rawinput which isn't part of the editor anymore. Setting WS_CHILD flag to false instead of true here https://github.com/stride3d/stride/blob/master/sources/presentation/Stride.Core.Presentation/Controls/GameEngineHost.cs#L131 resolves the issue but causes others. Not exactly sure why it kind of works yet though.

Eideren avatar Jan 11 '22 18:01 Eideren

Temporarily reverted #1274 so that we can release 4.1

xen2 avatar Jul 15 '22 08:07 xen2

Any update on this? It leaves a sour taste on my tongue when I use the editor.

jusvit avatar Sep 28 '23 09:09 jusvit

I'll look into it again later today

Eideren avatar Sep 28 '23 12:09 Eideren

Opened a workaround for this issue, see https://github.com/stride3d/stride/pull/1897 @jusvit

Eideren avatar Oct 06 '23 05:10 Eideren