Repository navigation
Note
This release requires Godot 4.4 or later
Caution
Breaking Changes
dead_zone_width & dead_zone_height
Have changed from type float to Vector2. As a result, this will reset current values in existing scenes.
This was done as part of the newly added support for individually changing dead zone sides (See Individual Dead Zone Adjustments (2D & 3D) section further down for more details).
append_look_at_target
Has changed from append_look_at_target to use the plural append_look_at_targets to reflect the property that is being affected (look_at_targets).
✨ New Feature
Lookahead 3D
pcam-lookahead-3d.mp4
3D PCam nodes now support the lookahead functionality thanks to the great work of @Mustfa-IT (#616). Similar to the 2D version, this enables the camera to accelerate ahead of its follow target position as it moves in a given direction, with options to adjust how far ahead it can go in the individual axes. This behavior can also be applied to both Follow and Look At modes.
Framed Follow 3D Refactor & Other Improvements
Long overdue, but finally here is a completely rewritten 3D Framed Follow system, which resolves multiple bugs and camera behavior issues. Beyond this, the change also comes with several additional features and quality-of-life changes, most of which also affecting the 2D variant.
Individual Dead Zone Adjustments (2D & 3D)
pcam-0.12-individual-dead-zone-adjustments.mp4
Previously, the opposite dead zone sides, i.e., left and right (horizontal) and top and bottom (vertical), were mirrored, meaning the distance from the left and right dead zones was always identical. With this release, it's now possible to change the left, right, top, and bottom sides individually to provide more flexibility.
Interactive Dead Zone controls (2D & 3D)
pcam-interactive-dead-zone-controls.mp4
As an added usability feature, it's now possible to click and drag dead zones to change the property values from both the Viewfinder and at runtime if Show Viewfinder in Play is enabled. By default, dragging one side will mirror its changes to the other side; however, by holding CTRL allows you to adjust just the side that is being dragged.
This functionality can be disabled for either the viewfinder, at runtime, or both with the added Interactive Dead Zone property in the PCams inspector.
Note
The Framed Follow camera must have its properties editable for this to work.
E.g., if you have instantiated a scene that contains the Framed Follow camera inside a root scene, then the instantiated scene must have Editable Node enabled.
Dead Zone Depth (3D)
pcam-dead-zone-depth.mp4
Framed Follow forPCam3D will by default have a fixed distance between itself and its follow target. A new node property called Dead Zone Depth, as the name implies, allows for adding a third dead zone where the camera is not moving in its forward axis until the target exits the forward dead zone. Unlike dead_zone_width and dead_zone_height, dead_zone_depth cannot be previewed, so adjust accordingly.
Center on Active (2D & 3D)
A toggle has been added to Framed Follow camera can re-center itself upon becoming active. This is useful if one wants to reset the composition to center the target in the viewport if, for example, the followed target has teleported while inactive and thus would lean up against a dead zone upon becoming active again.
Process logic refactor for PhantomCamera3D
tldr; PCam3D will now always run its logic in _process rather than _physics_process with more consistent camera results, particularly for Third-Person Follow.
This resolves a general issue where 3D cameras are not always moving consistently, which was most noticeable when rotating around a target in Third Person Follow and occasionally when playing at low physics ticks. Another improvement from this is that the camera noise, i.e., camera shake, effect should now have a consistent movement pattern no matter the physics tick. All-in-all, this should make PCam3Ds behave a lot more smoothly and consistently.
More context & details
The addon was initially running its positional and rotational logic in the _process, but this had the side effect of not appearing well at lower physics ticks as a result. At a later release, this was changed so that the logic was always performed in the _physics_process. While this yielded better results, there were still cases where it could lead to unwanted camera movement, even at higher physics ticks.
However, thanks to the addition of get_global_transform_interpolated() introduced in Godot 4.4, PCam3D nodes now always run in the _process tick, crucially without the previous issues. This has been a longer rewrite and resulted in a made-from-scratch third-person follow system, replacing the SpringArm3D node logic that it was previously utilizing (#671).
Important
When working in 3D scenes with Third Person Follow and wanting to use collision detection it's now highly recommended to use Jolt as the physics engine to improve movement when the camera gets affected by colliders.
This can be changed from Project Settings/Physics/3D/Physics Engine.
Important
As a result of this, changing the interpolation_mode of PCamHost nodes to Physics will no longer have any effect on PCam3Ds.
Note
A 2D version of this is being explored for a future release.
Editor Dock (Godot 4.6 & above)
The editor panel has been updated to utilize the latest Godot docking system, providing the same modern editor behavior as the other panels.
New Editor Features
- The panel can be detached and float as a separate window, meaning you can now position the viewfinder on a second monitor or in a smaller window on top of the editor. Just right-click on the editor panel and press
Make Floating.
- If you have editor icons enabled (found inside
Editor Settings/Interface/Editor/Bottom Dock Tab Style, a Phantom Camera icon will also appear on it.
Thanks @stilobique for the above suggestion (#644), which led to this change (#650).
Note
The above change only affects users on 4.6 or above. The addon remains compatible down to Godot 4.4, it will just use the previous editor dock system.
⬆️ Improvements
- Prevent
priorityre-checks if the newly assignedPCampriorityvalue is identical to its existing one.- Thanks @joey-wheeler99 for the PR (#664).
- Added a Project Settings option to disable warning output when using a
followandlook atmode at the same time on a singlePCam3D.- Thanks @BuddhaDom for the PR (#676).
- Silenced editor warnings when using C# about "possible null reference assignment" from
PhantomCameraHost.cs.
🐛 Fixes
- Fixed a typo in the
Dead Zone Heightproperty description forPCam3Dnodes where it incorrectly said "horizontally" instead of "vertically".- Thanks @adamscott for the PR (#652).
- Fixed a typo in
PCam2D'sfollow_targetsproperty description where it contained a "#" too many. - Fixed an editor issue where a new
CanvasLayerswould be instantiated every time a PCam withFramed Followbecomes active and whenShow Viewfinder in Playis enabled. - Fixed an issue with
Up Targetbeing cleared when changing scene in the editor.- Thanks @BuddhaDom for the PR (#673).
- Resolved an issue where changing
Follow Offsetwhile usingFollow Axis Lockwouldn't offset the follow position. - Fixed an issue with
Look At Groupcould clear targets when changing scenes (#687). - Added missing
#endregiontophantom_camera_2d.gd. - A fair number of properties for
CameraAttributesPhysicalandCameraAttributesPracticalare now applying their values correctly when tweening beweenPCam3Ds with different resources of the same type. - Fixed a method name typo for appending a look at target to Look At Group, where instead of
append_look_at_targetsit was using the singularappend_look_at_target.