Skip to content

v0.12

Latest

Choose a tag to compare

@ramokz ramokz released this 17 Nov 11:50
· 6 commits to main since this release

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

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-refactor

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)

image

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

pcam-0 12-pcam3d-process-change

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).

  • Thanks @Kekitopu for starting the discussion and helping test this change (#648).

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.
image
  • 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.
image

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 priority re-checks if the newly assigned PCam priority value is identical to its existing one.
  • Added a Project Settings option to disable warning output when using a follow and look at mode at the same time on a single PCam3D.
  • Silenced editor warnings when using C# about "possible null reference assignment" from PhantomCameraHost.cs.

🐛 Fixes

  • Fixed a typo in the Dead Zone Height property description for PCam3D nodes where it incorrectly said "horizontally" instead of "vertically".
  • Fixed a typo in PCam2D's follow_targets property description where it contained a "#" too many.
  • Fixed an editor issue where a new CanvasLayers would be instantiated every time a PCam with Framed Follow becomes active and when Show Viewfinder in Play is enabled.
  • Fixed an issue with Up Target being cleared when changing scene in the editor.
  • Resolved an issue where changing Follow Offset while using Follow Axis Lock wouldn't offset the follow position.
  • Fixed an issue with Look At Group could clear targets when changing scenes (#687).
  • Added missing #endregion to phantom_camera_2d.gd.
  • A fair number of properties for CameraAttributesPhysical and CameraAttributesPractical are now applying their values correctly when tweening beween PCam3Ds 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_targets it was using the singular append_look_at_target.

🏅 New Contributors