Implement FlyBy and Static Camera previews#1123
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements camera preview functionality for both flyby sequences and static cameras in the Tomb Editor. It introduces a real-time preview system that allows level designers to visualize camera behavior before testing in-game.
Changes:
- Adds FlybyPreview class implementing Catmull-Rom spline interpolation for smooth flyby camera sequences with support for speed, FOV, roll, and camera flags (freeze, cut)
- Introduces CatmullRomSpline utility class matching TEN's spline implementation, replacing the old natural cubic spline for flyby path rendering
- Integrates camera preview mode into the editor with hotkey support (F7), context menu options, and proper state management
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| TombEditor/FlybyPreview.cs | New class implementing flyby sequence preview with spline interpolation and game-accurate camera behavior |
| TombEditor/CatmullRomSpline.cs | New spline evaluation utility matching TEN's implementation for consistent camera paths |
| TombEditor/Editor.cs | Adds ToggleCameraPreviewEvent and state flags for camera preview mode |
| TombEditor/Controls/Panel3D/Panel3D.cs | Integrates flyby preview timer and state management into the 3D panel |
| TombEditor/Controls/Panel3D/Panel3DCameraMovement.cs | Implements camera preview logic for both flyby sequences and static cameras with target resolution |
| TombEditor/Controls/Panel3D/Panel3DMouse.cs | Blocks mouse interaction during camera preview, allows click/ESC to exit |
| TombEditor/Controls/Panel3D/Panel3DDraw.cs | Hides camera markers, paths, and gizmo during preview; implements roll-aware view-projection matrix |
| TombEditor/Controls/Panel3D/Panel3DHelpers.cs | Updates flyby path rendering to use CatmullRomSpline instead of old Spline class |
| TombEditor/Controls/ContextMenus/MaterialObjectContextMenu.cs | Adds "Preview" menu items for camera and flyby camera objects |
| TombEditor/Command.cs | Registers PreviewCamera command with logic to handle selected camera/flyby objects |
| TombEditor/Hotkey.cs | Adds F7 hotkey for camera preview toggle |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…eview # Conflicts: # TombEditor/Controls/Panel3D/MouseHandler/Panel3DMouse.cs # TombEditor/Controls/Panel3D/Panel3DDraw.cs
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
@copilot Could you please review this PR and make sure we're all production ready? If there's any code de-duplication we can do in the changes, please feel free to implement a fix. |
|
@Nickelony I've opened a new pull request, #1158, to work on those changes. Once the pull request is ready, I'll request review from you. |
…ssions Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Harden CatmullRomSpline inputs and clean up Panel3DDraw expressions
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
This PR is ready. If anyone wants to add anything else to it, please feel free to do so. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Superseded by #1165 |
No description provided.