Implement Catmull-Rom spline for smooth continuous cinematic camera movement and rotation control#1
Conversation
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
|
@copilot rewrite the cinematic logic. Currently, its simple 3 teleports and not a smooth movement |
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
I've improved the movement smoothness by sending teleport packets every tick (50ms) instead of every 10 ticks (500ms). The cinematic now uses:
This should eliminate the jerky "3 teleport" behavior and provide smooth camera movement through all the location keyframes. (commit 40099db) |
|
@copilot Ok schon wesentlich besser, aber die CinematicLocationKeyFrame sollen nicht ein kompletter stop sein, sondern nur um den weg besser zu berechnen, wo der weg lang gehen soll. Es soll nicht A -> B B -> C sondern A -> C und an B zur richtigen Zeit vorbei |
…h waypoints Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
I've rewritten the cinematic logic to use Catmull-Rom spline interpolation. The camera now flows continuously from A → C, passing through B at the correct time without stopping. CinematicLocationKeyFrame waypoints are now used only to calculate the smooth curve path, not as stop points. The result is one continuous smooth motion instead of separate segments. (commit 955f7f2) |
…olation Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
|
@copilot the currently CinematicStopKeyFrame semms to be ignored. the camera doesnt move there |
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
…imized angle normalization Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
…ocessing Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Fixed the execution order. The movement processing now happens before the completion check, ensuring the camera reaches the CinematicStopKeyFrame location at tick 160 before the cinematic terminates. The issue was that the completion check was running before the final movement update. (commit f000b78) |
|
@copilot Implement this KeyFrame data class CinematicRotationChangeKeyFrame( It should smoothly change the rotation of the marker (indirect the players view) over the specific timeframe |
… over time Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Implemented CinematicRotationChangeKeyFrame with smooth rotation interpolation over the specified timeframe. The keyframe is created in the API module and handles angle wrapping for shortest rotation path. It can be used during camera movement to override the path-based rotation. (commit 18b0c3b) |
…e and transitions Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
…tability Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
|
@copilot The finishTutorial method from Tutorial Service has to be called everytime when the tuotrial ends |
Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Added call to tutorialService.finishTutorial(player) when the cinematic completes naturally. This ensures the player is properly teleported back to their original location, their game mode is restored, and they're removed from the active tutorials list. (commit 8da4a49) |
…ath' into copilot/fix-cinematic-movement-path
Cinematic Movement Fix - Production Ready ✅
All Issues Fixed + New Features:
Final Implementation:
Position (Catmull-Rom Spline):
Rotation (Dual System):
Segment Lookup (Binary Search):
left + (right - left) / 2Execution Order Fix:
Tutorial Lifecycle Management:
tutorialService.finishTutorial(player)New Feature: CinematicRotationChangeKeyFrame
Added a new keyframe type that allows smooth rotation changes of the camera (player view) over a specified timeframe:
How it works:
timeticktimeFrameticksExample usage:
Safety & Robustness:
Path Example:
Code Quality:
Testing:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.