Skip to content

[Task] Add deterministic FlyCamera and controller coverage #783

Description

@JeanPhilippeKernel

Type

  • Bug
  • Feature
  • Refactor / cleanup
  • Task / chore

Overview

The FlyCamera redesign has no dedicated automated test coverage. Its state transitions, camera math, controller mapping, and input reset behavior should be verified without needing a Vulkan device.

Context

The current rendering suite validates render-graph and PSO behavior, but no FlyCamera test source exists. The implementation includes math and state-machine behavior that can be covered by CPU-only tests.

Related: #780, #781, #782, and ZEngine/docs/future-plan/fly-camera-redesign.md.

What needs to be done

  1. Add a FlyCamera test fixture with deterministic camera settings and delta time.
  2. Cover free-flight movement, diagonal normalization, speed scaling, smoothing, and pitch/yaw limits.
  3. Cover pan, orbit, scroll zoom, focus animation, bookmarks, and viewport ray unprojection.
  4. Cover viewport resize/aspect updates and zero-extent handling.
  5. Add controller tests for Idle, Hover, Fly, cursor release, and PauseEventProcessing reset behavior.
  6. Provide an InputManager fixture or narrow test seam so action mapping can be tested without GLFW/Vulkan.

Resources

  • ZEngine/ZEngine/Rendering/Cameras/FlyCamera.h
  • ZEngine/ZEngine/Controllers/FlyCameraController.h
  • ZEngine/ZEngine/Input/InputManager.h
  • ZEngine/tests/Rendering/RenderGraphTest.cpp for existing test conventions

Testing

  • Build: cmake --build --preset Darwin_arm64_Debug --target ZEngineTests --parallel 1
  • Run: ./Result.Darwin.arm64.Debug/ZEngine/tests/Debug/ZEngineTests --gtest_filter='FlyCamera*:FlyCameraController'
  • Run the full suite before merge.

Acceptance criteria

Estimated effort

2–3 days

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions