Skip to content

Releases: ramokz/phantom-camera

v0.8

19 Oct 12:24
Compare
Choose a tag to compare

🚨 Breaking Changes

  • append_look_at_targets_array used to take a Array[NodePath] as a parameter
    • Parameter now only accepts type Array[Node3D]

⚠️ Deprecated Functions & Properties

  • erase_look_at_targets_member is now deprecated
    • Use erase_look_at_targets instead.

✨ New Features

phantom-camera-noise

Phantom Camera Noise


2D

3D
2d_noise.mp4
3d_noise.mp4

Camera noise, a long requested feature, also known as camera shake, has now been added for PCam2Ds and PCam3Ds, able to affect both the rotation and position of a given PCam. The feature comes with a few additional nodes and resources that enable this functionality.

Read more on the documentation site for a better general overview.

Phantom Camera Noise Resource

Named PhantomCameraNoiseResource, is a new resource type with a 2D and 3D variant. It defines all the variables for the noise such as intensity, rotational / position multiplier and randomness seed. The noise is calculated using a perlin noise pattern.

Read more about the PhantomCameraNoise2D and PhantomCameraNoise3D on the documentation site.


Phantom Camera Noise Emitter

Named PhantomCameraNoiseEmitter, is a new node type with a 2D and 3D variant for their respective scenes. Its primary use case is to trigger noise at a given moment, by calling its emit() method, for either a specified duration or a continuous loop. It can be previewed in the editor by toggling the Preview property in the inspector.

Read more about the PhantomCameraNoiseEmitter2D and PhantomCameraNoiseEmitter3D on the documentation site.

⬆️ Improvements

  • TileMapLayer Support for the Limit Node feature
  • Active PCams' logic are now being called in the same tick as the PCamHost it belongs to, whereas previously PCams triggered their logic in their own tick, which was often not in sync with the PCamHost node. This is to better synchronize the PCam2D/3D and Camera2D/3D logic, which should further smooth out camera movement.
    • Thanks @m4rr5 for the suggestion
  • Reduced the under-the-hood complexity of the Follow (2D / 3D) and Look At (3D) logic
  • Added dead_zone_reached signal, is emitted whenever the target touches the edge of the dead zone
  • Improved the behavior of 2D Framed Follow. Should now no longer change vertical camera movement when only the horizontal dead zones are reached and vice versa

🐛 Fixes

  • Resolved a crash that would occur when freeing a parent of follow_target, follow_targets (for group follow) or look_at_target and look_at_targets (group look at) (#381)
  • Resolved error spam when changing 2D scene
  • Resolved error spam when changing 3D scene
  • Resolved an issue with getting an error spam when having an empty or a valid target not in the first array index when using Follow Group or Look At Group
  • Resolved an issue where Auto Zoom (2D) and Auto Follow Distance (3D) properties would be visible when the follow mode wasn't set to Group
  • Resolved an issue where Follow Group would be biased towards the first follow target in the array
  • Resolved a false positive error saying: get_tree: Parameter "data.tree" is null. This was due to having enabled Physics Interpolation in the Project Settings, where the addon changed the Physics Interpolation of the camera to Off for none-physics targets, when it should be Inherit (#377)

v.0.8 Beta

03 Oct 12:38
Compare
Choose a tag to compare
v.0.8 Beta Pre-release
Pre-release

Important

This beta is intended as a pre-release build to allow the community to give feedback on the upcoming version before it goes live for everyone.
The main area of feedback interest is about the Phantom Camera Noise feature (see below).

Note

The version number in plugin.cfg is purposely set to v0.7.9.
This is to allow for upgrading to v0.8 from the Beta release using the addon's updater.

Note

Feedback and comments can be shared in the discussion post found here.

🚨 Breaking Changes

  • append_look_at_targets_array used to take a Array[NodePath] as a parameter
    • Parameter now only accepts type Array[Node3D]

⚠️ Deprecated Functions & Properties

  • erase_look_at_targets_member is now deprecated
    • Use erase_look_at_targets instead.

✨ New Features

Phantom Camera Noise

A long requested feature, camera noise, also known as camera shake, is available for PCam2Ds and PCam3Ds, able to affect both the rotation and position of the PCam.

Phantom Camera Noise Resource

Named PhantomCameraNoiseResource, is a new resource type with a 2D and 3D variant. It defines all the variables for the noise such as intensity, rotational / position limits and randomness seed. The noise is calculated using a perlin noise pattern.

Both 2D and 3D Noise Resources can apply changes to position and rotation; however, it's recommended to avoid rotational noise in 3D scenes to avoid geometry clipping issues.


Phantom Camera Noise Emitter

Named PhantomCameraNoiseEmitter, is a new node type with a 2D and 3D variant for their respective scenes. Its primary use case is to trigger noise at a given moment, by calling its .emit() method, for either a specified duration or a continous loop. It can be previewed in the editor by toggling the Preview property in the inspector.

Each emitter uses a Noise Resource to define its noise pattern and only affects the PCams in the matching Noise Emitter Layers. That is to say, in order for the emitter to work both the emitter and the individual PCam node needs to have at least one matching Noise Layer

Quick Guide

There are 2 ways to apply noise to a Camera2D/3D with this system:

  1. Supply a Noise Resource to the Noise property in a given PCam directly. Doing so will make the noise run persistently without pause on that specific PCam. Note: This will only run after a tween has been completed.
  2. Add a Noise Emitter (PhantomCameraNoiseEmitter node) to the scene, assign a Noise Resource and trigger it at any time by calling its emit() function — again, it can be previewed in the viewfinder by toggling the Preview button. The Emitter can be placed anywhere in the scene tree. Note: This will impact the Camera2D/3D both when following and during a tween to a PCam if it has a matching Noise Layer.

Using External Noise Values

If the user wants to supply their own noise values, either from third-party libraries or using their scripts, then that can be achieved by calling emit_noise() from a PCam2D/3D by supplying a Transform2D or Transform3D respectively.

Examples Scenes

  • 2D - 2d_noise_example_scene.tscn
  • 3D - 3d_noise_example_scene.tscn

⬆️ Improvements

  • TileMapLayer Support for Limit Node
  • Simplified Follow (2D / 3D) and Look At (3D) logic in the tick thread
  • Added dead_zone_reached signal, is emitted whenever the target touches the edge of the dead zone
  • Improved the behaviour of 2D Framed Follow. Should now no longer change vertical camera movement when only the horizontal dead zones are reached and vice versa

🐛 Fixes

  • Resolved a crash that would occur when freeing a parent of follow_target, follow_targets (for group follow) or look_at_target and look_at_targets (group look at) (#381)
  • Resolved error spam when changing 2D scene
  • Resolved error spam when changing 3D scene
  • Resolved an issue with getting an error spam when having an empty or a valid target not in the first array index when using Follow Group or Look At Group

v0.7.3

03 Aug 12:05
Compare
Choose a tag to compare

✨ New Features

phantom-camera-attributes-environemnt

Attributes & Environment Resource Support (3D-only)

Attributes

Allows for setting and dynamically tweening between CameraAttribute resources for each PCam3D. Used to enable and transition between things like depth-of-field, i.e. camera blur, and camera light exposure.

0.7.3-attributes-resource.mp4

Note

The attribute interpolation in the video above appears instant, however, that is due to the tween duration being very short.

Important

If a CameraAttribute resource is already applied to a Camera3D node, then adding one to a PCam3D will automatically override it.
Again, using an Attribute resource in the PCam3D should be intended as a means of dynamically switching between different resources for tweens. In other words, if a project, or scene, only needs one CameraAttribute resource, then consider using a WorldEnvironemnt node or apply it directly to Camera3D node instead.

Important

Aside from a few exposure properties, any tweening between different CameraAttribute resources will only occur if the types are the same. So for best results, stick to using just CameraAttributePractical or CameraAttributePhysical.

Important

If applying a CameraAttribute resource to a PCam3D, then the Camera3D will retain the most recently applied one if the consequent active PCam3Ds have no CameraAttribute applied.
So if you want to move away from a current CameraAttribute setting, or reset it to default values, you would need to have another, active, PCam3D with another CameraAttribute resource with the desired changes / defaults.

Environment

Support has also been added for setting Environment resources for individual PCam3Ds. Unlike CameraAttributes, however, the properties here are not tweened between each PCam3D instance.

Also, like with CameraAttributes, only consider using this if there is a desire to change the environment variable per PCam3D instance. Otherwise, consider using a WorldEnvironemnt node or apply it directly to Camera3D node instead.


phantom-camera-visibility

Enable by Visibility

Disable a PCam2D/3D from activating, or deactivate an active one, by setting its visibility to false.

Works both in the editor and during runtime.

0.7.3-enable-by-visibility.mp4

⬆️ Enhancements

  • Camera3DResource properties can now be accessed and modified using the property name from a PCam3D directly, instead of having to call the getter or setter function to do the respective.
    • E.g. instead of changing the fov using pcam_3d.set_fov(value), it can be written as pcam_3d.fov = value
  • Likewise, PhantomCameraTween properties can now also be accessed and modified using properties.
    • E.g. instead of pcam_2d.set_tween_duration(value) it can be written as pcam_2d.tween_duration = value
  • Added additional checkers for the follow (2D and 3D) and look_at (3D) processes to prevent errors if the target is freed during runtime.

🐛 Fixes

  • Resolved an error log when disconnecting a signal from an addon UI node when disabling the addon (#358)

v0.7.2.1

22 Jun 17:28
Compare
Choose a tag to compare

🐛 Fixes

  • Resolved an issue with the addon not consistently loading the PhantomCameraManager singleton upon installation, which causes a cascade of errors and general usability issues (#338).
  • Resolved an issue with tweens not running its last frame making some properties not tween to the intended value (#330). Was particularly noticeable when tweening between PhantomCamera3DResources.

v0.7.2

05 Jun 11:38
ba55607
Compare
Choose a tag to compare

✨ New Features

Phantom Camera Manager

phantom-camera-manager

A singleton class that can be accessed from all scripts. It allows for accessing all the PCams and PCamHosts in a given scene.

# Returns all PhantomCamera2D nodes in a scene
PhantomCameraManager.phantom_camera_2ds

# Returns all PhantomCamera3D nodes in a scene
PhantomCameraManager.phantom_camera_3ds

# Returns all PhantomCameraHost nodes in a scene
PhantomCameraManager.phantom_camera_hosts

This also marks the foundational work for getting Camera Noise (#126) and Multi PCamHost / Split Screen support (#26) working.

PhantomCamera3DResource Projection Types

image

It's now possible to set the Projection type to Perspective, Orthogonal and Frustum, and their associate properties within the PhantomCamera3DResource resource. Previously limited to just Persepctive.

If tweening between two PCam3D that both use Orthogonal or Frustum, then the Size and Frustum Offset will be tweened when switching.

Near and Far properties have also been added. They, too, will be tweened if the values differ between PCams.

Thanks @Jegber for the proposal (#218).

⬆️ Enhancements

Muted Updater

editor-updater-panel

After some feedback that the current updater being too 'in-your-face' whenever new releases are out, the changes here will now prevent the updater prompt from appearing on start-up.

Instead, it will now change the viewfinder panel button to include an icon with a changed text color. The update button can then, like in previous releases, be accessed from the top-right side of the Viewfinder panel, which will trigger the updater prompt.

Thanks @kelteseth for the feedback (#271).

🛠️ Fix & Improvements

  • Improved the PCam and PCamHost detection for the viewfinder. This was most apparent in scenes where multiple Camera2D or Camera3D nodes present (#307).
  • PCamHosts will now show a warning in the scenetree when it isn't a child of a Camera2D/3D and not spam errors in the Output tab.
  • Added suffix, such as m or °, to the appropriate Camera3DResource properties.
  • Resolved an issue where Tween on Load would trigger even if disabled for Third Person Follow when instantiated via code (#319).
  • Fixed an issue where setting FollowMode to None would not make a PCam movable in the editor (#320).
  • Added support for disable_3d export templates. This should allow 2D games that want to exclude 3D specific nodes to be exported without errors (#311).

v0.7.1

01 Jun 20:18
0b2b1a9
Compare
Choose a tag to compare

✨ New Features

2D Physics Interpolation Support

2d-physics-interpolation

Important

This enhancement is only available for 2D scenes in Godot 4.3 and later.
Any existing setup shouldn't be affected by this, this is mainly a behind-the-scenes change.
The addon still supports Godot 4.2.

With the added 2D physics interpolation support in Godot 4.3, the addon will now automatically switch the PCam2D and PCamHost nodes to use either the _process or _physics_process depending on the node type of the assigned follow target. This should greatly reduce, and likely entirely remove, jitter when assigning a PhysicsBody2D as a follow target or when having a lower physics tick. More importantly, it should make the addon easier to pick up and use out-of-the-box without having to read and use any of the recommended tips on the documentation site.

For 3D scenes and Godot 4.2 users

The changes here will provide additional guidance in the Output tab when assigning a PhysicsBody as a follow target or look at (3D). The intent is to better support addon newcomers until both 2D and 3D have physics interpolation.
The tip can be disabled from the Project Settings / Phantom Camera.

Godot 4.3 specific 2D example scenes

As the updated system requires a different node structure between Godot 4.2 and 4.3, an additional 2D example scenes folder has been made that works using the changes from this release. Once Godot 4.3 becomes the minimum required version, these example scenes will be deprecated and its changes moved over to the existing 2D example scenes.

Note

3D physics interpolation will be supported in a future Godot release - until then, the recommendation in the guide still stands.

🛠️ Changes & Improvements

  • The cull_mask property inside Camera3DResource is now set to use the correct export layers. Used to be export_flags_3d_physics and is now export_flags_3d_render.
  • Resolved an issue where dead zones would persistently appear in the viewfinder if a PCam was set to Framed Follow and had enabled it through the inspector and then switched to another follow mode before running the game.
  • Updated the wording for the Editor Updater to avoid confusion for larger releases.
  • Improved the DX when setting a limit target. It will now trigger an output statement if an assigned value is either not of type TileMap or CollisionShape2D as well as if a NodePath isn't valid in the first place. It will now also prevent the limit size from resetting should either of these two scenarios occur.
  • Updated append_look_at_targets_array to now correctly apply the correct node type(s) to the look_at_targets array.
    • Note: The parameter type will change from NodePath to Node3D, but not until the 0.8 release, as it's a breaking change. This wasn't done in the 0.7 release due to oversight.
  • Reapplied top_level setter for the character script in the 2D example scenes to remove jitter when not having any damping applied to the PCam2D.

Ko-fi Donations

kofi

Added a donation link for those feeling generous. Donations will have no impact on the addon's development, it's purely a “thank you” system.

v0.7.0.6

02 May 10:29
Compare
Choose a tag to compare

🐛 Fixes

  • Fixed an issue where Follow Path for 2D scenes couldn't trigger due to an incorrect conditional checker.

v0.7.0.5

30 Apr 21:24
Compare
Choose a tag to compare

🐛 Fixes

  • Fixed an issue where Auto Follow Distance for PCam3D was applying the incorrect distance property, resulting in it not working correctly.

v0.7.0.4

29 Apr 21:28
Compare
Choose a tag to compare

🐛 Fixes

  • Fixed a regression from the 0.7 release where Limit Sides that had their values set using either the PCam2D number input fields in the inspector or via code, e.g. pcam_2d.limit_bottom = 40, would reset to their default values on start-up or after a tween.
  • Readded set_limit and get_limit function calls

v0.7.0.3

28 Apr 22:21
7c358dd
Compare
Choose a tag to compare

🐛 Fixes

  • Resolved an issue where having a follow target assigned while also using a limit target would result in the follow target moving with an integer precision instead of floating-point precision.