stride3d / stride3d/stride

Editor camera stutters/does not process inputs

Open
#94 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-GameStudio area-Input bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

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 ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the stutter in the editor camera and compare it with the animation sample game build, where Input.IsKeyDown behaves normally. Read the editor camera input handling around UpdateCameraAsPerspective and the microthread created through Game.Script.AddTask. Done means identifying the scheduling or input-processing cause and confirming smooth keyboard and mouse camera input.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.