Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed jitter for none physics object #179

Merged
merged 4 commits into from
Jan 19, 2024
Merged

Fixed jitter for none physics object #179

merged 4 commits into from
Jan 19, 2024

Conversation

P5ina
Copy link
Contributor

@P5ina P5ina commented Jan 17, 2024

Camera is not a physics body, it should be animated in _process. There is example of my fix:

Before

plugin_showcase.mp4

After

plugin_showcase_patch.mp4

The cube is animated through tweens, but they're working in _process. Script example:

extends MeshInstance3D

func _ready():
	var tween = create_tween().set_loops()
	tween.tween_property(self, "position", Vector3(4, 0, 0), 2.0).set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_QUAD)
	tween.tween_property(self, "position", Vector3(-4, 0, 0), 2.0).set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_QUAD)

@Lasuch69
Copy link

Hello! I want to point out that this change makes huge difference, however spring arm is still causing a bit of jitter when camera is up against the wall.

I am more than happy to implement spring arm smoothing once this PR is merged.

@P5ina
Copy link
Contributor Author

P5ina commented Jan 17, 2024

@Lasuch69 Thanks for pointing this out, I will investigate into this. I think I know how to fix this.

@ramokz
Copy link
Owner

ramokz commented Jan 18, 2024

This PR does seem to solve both your point of jittery animations happening in the _process, like your tween example, and the issue described in #173. Have been trying to find a way that meant you didn't need to use the smoothing-addon, but it might not be a feasible thing to automatically solve for this addon alone. Though there is still a jitter issue when you disable the damping and have a PhysicsBody a target. The obvious solution would be to use the visual representation (mesh/sprite) node as the Follow Target, but wonder if there's a way to still allow the PhysicsBody to be used as a target. Obviously, it's a fairly minor thing and won't lose any sleep over it.

This current solve does also mean that the requirement of the smoothing-addon needs to be communicated, especially to those just picking up the addon / Godot, as to not cause people to think something is fundamentally broken. Which is probably my biggest concern.

@ramokz ramokz linked an issue Jan 18, 2024 that may be closed by this pull request
@P5ina
Copy link
Contributor Author

P5ina commented Jan 18, 2024

@ramokz I think, we can make a switch to be able to use both _process and _physics_process. But I still think that using physics process for camera is a very bad idea and crutch but not a solution for physics objects.

@P5ina
Copy link
Contributor Author

P5ina commented Jan 18, 2024

I think I know how to fix this. We can make a smoothing inside the camera script, like it's done in smoothing addon. I'll implement this.

@Lasuch69
Copy link

Lasuch69 commented Jan 18, 2024

I don't think that we should care about if target is smoothed or not, as it isn't really the responsibility of the camera. If you want to fix jitter you need to smooth the target anyway. I would suggest making smoothing just for the spring arm and animation in the _process and that's all.

We would end up with double smoothing, which might introduce "lag".

Edit: Another way it could be done is to make camera smoothing optional.

@ramokz
Copy link
Owner

ramokz commented Jan 19, 2024

Inclined to agree that it's fair to expect the developer to be responsible for keeping visual representation of nodes smoothed when they're nested within a physics based node, given it's a known issue and should have a better built-in solution eventually. From reading, Godot 3.5 and 3.6 have 3D and 2D support respectively, so is just pending a 4.x integration. So happy to leave the PR in its current state and merge it in.

The one thing I do want to avoid is the experience friction point when people update the addon to then suddenly start seeing jitter that wasn't present before. For some, the solution would require them to add either an additional add-on, or add a few lines of code themselves — not a big deal in of itself, but will likely be confusing for people who don't know. For that reason, I would prefer this change being merged as part of the 0.7 release, as that will introduce wider breaking changes. So that will provide an opportunity to walk through everything that has changed and how to make a scene give the expected results in the release notes. Equally, docs and example scenes will also need to be updated as part of that.

@ramokz ramokz changed the base branch from main to 0.7 January 19, 2024 21:10
@ramokz ramokz merged commit 4d1f563 into ramokz:0.7 Jan 19, 2024
@ramokz
Copy link
Owner

ramokz commented Jan 19, 2024

Thanks for bringing up the discussion and submitting this PR 💯

ramokz added a commit that referenced this pull request Mar 20, 2024
* Update README.md

* Added a checker for PCam Host when a PCam exits the scene (#175)

* Fixed jitter for none physics object

---------

Co-authored-by: Marcus Skov <Hello@MarcusSkov.com>
ramokz added a commit that referenced this pull request Apr 25, 2024
* Added instance validator on _exit_tree()

* First pass for 3D _validate_property()

* Added additional 3D properties

* Fixed jitter for none physics object (#179)

* Update README.md

* Added a checker for PCam Host when a PCam exits the scene (#175)

* Fixed jitter for none physics object

---------

Co-authored-by: Marcus Skov <Hello@MarcusSkov.com>

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Updated viewfinder.gd

* Minor property reference updates

* Updated phantom_camera_3D.gd and phantom_camera_2D.gd

* Updated plugin.cfg to 0.7

* Updated more properties and example scenes

* Fixed issue with grabbing active_pcam in viewfinder.gd

* Minor updates

* 171 third person quaternion (#190)

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Added quaternion setter/getter for Third Person Follow

* Embedded enums to PCam3D script directly

* Added additional doc comments

* Updated 3D example scenes

* Merged #191 into 0.7

* (Re)added draw limits variable to PCam2D

* Updated script documentation

* Added more properties and signals to PCam scripts
- [Removed] Remaining constant. variable uses
- [Added] dead_zone_changed signal
- [Added] PhantomCameraHost variable to PCam scripts directly
- [Updated] viewfinder.gd with the dead_zone_changed signal change

- [Updated] pcam active setter in PCamHost using setter method

* Added enums directly to tween_resource.gd
- [Added] GDScript descriptions to tween resource properties

* Changed assign_pcam_host to set_pcam_host

* Updated .import files

* Readded Host to Third Person Example scene

* Updated example scenes

* Fixed issue with Limit Margin not updating correctly

* Updated Tween Resource enum names to align with Tween class

* Removed phantom_camera_properties.gd

* Swapped yaw and pitch variable names

* Removed group_names.gd
- [Moved] group_names.gd constants to phantom_camera_constants.gd

* Updated example scenes

* Added Cull Mask Helper Function
- [Added] Setter / Getter for SpringArm3D shape and margin
- [Renamed] Camera3DResource setter/getter names

* Changed reset_limit_all_sides() to reset_limit()

* Removed _camera_3D_resouce_default and tween_resource_default
- [Renamed] spring_arm setters/getters
- [Added] set_collision_mask_value helper function
- [Added] Missing setters/getters

* Fixed UI in 2D example scene

* Removed tween_resource_default from PCam2D

* Updated example scenes

* Fixed issue with limit not working after a tween

* Updated PCam Host setter/getter

* Privitised has_tweened and has_multiple_follow_targets

* Renamed pixel_perfect to snap_to_pixel

* Added look_at_target_changed signal

* Updated many script documentation comments

* Added missing default values to phantom_camera scripts

* Added comments and privatised variables and functions in phantom_camera_host.gd

* Added documentation and editor icon for tween_resource.gd

* Added documentation for camera_3D_resource.gd

* Fixed issue when assigning empty target(s) on editor start

* Updated editor icons and removed unused

* Viewfinder 2d (#220)

* Initial working 2D viewfinder

* Updated gizmo icon
- [Removed] Old Gizmo icon(s)
- [Updated] viewfinder_panel.tscn with improved icon sizing layout

* Improved 2D viewfinder
- [Renamed] Lowercased ...2D and ...3D to 2d/3d in various variable names

* Improved aspect ratio scaler

* Improved viewfinder logic checker

* Removed commented out logic

* CleanED up viewfinder file

- [Removed] editor_interface variables and replaced with singleton Class ref
- [Removed] Unneeded conditional checker and logic

* Simplified scene change signal function

* Solved error with viewfinder
 Now no longer being referenced from export builds

* Updated example scenes

* Added missing PCamHost to 2DExampleScene.tscn

* Fixed issue where various setters for _follow_spring_arm didn't get applied at runtime

* Added 2d rotation tween support

* Fixed issue with stacking viewfinder
Occured if you changed from one PCam to another that both used Framed Follow

* Cherry picked changes from main branch

* Added instance validator on _exit_tree()

* First pass for 3D _validate_property()

* Added additional 3D properties

* Fixed jitter for none physics object (#179)

* Update README.md

* Added a checker for PCam Host when a PCam exits the scene (#175)

* Fixed jitter for none physics object

---------

Co-authored-by: Marcus Skov <Hello@MarcusSkov.com>

* Updated viewfinder.gd

* Minor property reference updates

* Updated phantom_camera_3D.gd and phantom_camera_2D.gd

* Updated plugin.cfg to 0.7

* Updated more properties and example scenes

* Minor updates

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* 171 third person quaternion (#190)

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Added quaternion setter/getter for Third Person Follow

* Embedded enums to PCam3D script directly

* Added additional doc comments

* Updated 3D example scenes

* Merged #191 into 0.7

* (Re)added draw limits variable to PCam2D

* Updated script documentation

* Added more properties and signals to PCam scripts
- [Removed] Remaining constant. variable uses
- [Added] dead_zone_changed signal
- [Added] PhantomCameraHost variable to PCam scripts directly
- [Updated] viewfinder.gd with the dead_zone_changed signal change

- [Updated] pcam active setter in PCamHost using setter method

* Added enums directly to tween_resource.gd
- [Added] GDScript descriptions to tween resource properties

* Changed assign_pcam_host to set_pcam_host

* Readded Host to Third Person Example scene

* Updated example scenes

* Fixed issue with Limit Margin not updating correctly

* Updated Tween Resource enum names to align with Tween class

* Removed phantom_camera_properties.gd

* Swapped yaw and pitch variable names

* Removed group_names.gd
- [Moved] group_names.gd constants to phantom_camera_constants.gd

* Updated example scenes

* Added Cull Mask Helper Function
- [Added] Setter / Getter for SpringArm3D shape and margin
- [Renamed] Camera3DResource setter/getter names

* Changed reset_limit_all_sides() to reset_limit()

* Removed _camera_3D_resouce_default and tween_resource_default
- [Renamed] spring_arm setters/getters
- [Added] set_collision_mask_value helper function
- [Added] Missing setters/getters

* Fixed UI in 2D example scene

* Removed tween_resource_default from PCam2D

* Updated example scenes

* Fixed issue with limit not working after a tween

* Updated PCam Host setter/getter

* Privitised has_tweened and has_multiple_follow_targets

* Renamed pixel_perfect to snap_to_pixel

* Added look_at_target_changed signal

* Updated many script documentation comments

* Added missing default values to phantom_camera scripts

* Added comments and privatised variables and functions in phantom_camera_host.gd

* Added documentation and editor icon for tween_resource.gd

* Added documentation for camera_3D_resource.gd

* Fixed issue when assigning empty target(s) on editor start

* Updated editor icons and removed unused

* Viewfinder 2d (#220)

* Initial working 2D viewfinder

* Updated gizmo icon
- [Removed] Old Gizmo icon(s)
- [Updated] viewfinder_panel.tscn with improved icon sizing layout

* Improved 2D viewfinder
- [Renamed] Lowercased ...2D and ...3D to 2d/3d in various variable names

* Improved aspect ratio scaler

* Improved viewfinder logic checker

* Removed commented out logic

* CleanED up viewfinder file

- [Removed] editor_interface variables and replaced with singleton Class ref
- [Removed] Unneeded conditional checker and logic

* Simplified scene change signal function

* Solved error with viewfinder
 Now no longer being referenced from export builds

* Updated example scenes

* Added missing PCamHost to 2DExampleScene.tscn

* Fixed issue where various setters for _follow_spring_arm didn't get applied at runtime

* Added 2d rotation tween support

* Fixed issue with stacking viewfinder
Occured if you changed from one PCam to another that both used Framed Follow

* Cherry picked changes from main branch

* Damping 2.0 (#248)

* Smooth damp for phantom_camera_3D.gd

* Minor 3D damping updates

* Added Smooth Damp to phantom_camera_2D.gd
- [Updated] Minor things for 3D smooth damp system

* Re-added physics interpolation to 2D script

* Removed Smoothing nodes and improved 2d documentation

* Rotate damping (#251)

* Fixed incorrect name and added type to variable

* Fixed issue with look_at method not being called

* Added Look At Damping properties

* Changed _set_velocity to _set_follow_velocity

* Added Look At damping

* Updated damping default values

* Added conditional look_at_damping

* Added damping to LookAt Group

* Minor property updater fixes

* Removed unneeded variable

* Added range slider to Look At Damping

* Added additional look_at checks

* smooth_damp function parameter alignment

* Minor Group Look At fix

* Removed unused variables

* Corrected fixed camera angle tween duration

* Fixed issue with tweening 2D zoom

* Made player model be set to top level

* Made playable_character_2d.tscn its own scene

* Updated default 2D follow_damping_value

* Added playable_character_3d

* Updated remaining example scenes and scripts

* Updated room limit script

* Updated dev_scene_3d

* Renamed 2d_trigger_area

* Fixed tween issue in 3DExampleScene.tscn

* Removed documentation comment from _is_active

* Updated tween_onload to tween_on_load

* Updated examples scenes with tween_on_load rename

* Minor CharacterController changes

* Whitespace removal

* Renamed core scripts
[Renamed] phantom_camera_2D.gd to phantom_camera_2d.gd
[Renamed] phantom_camera_3D.gd to phantom_camera_3d.gd

* Renamed camera_3D_resource
- [Renamed] Renamed camera_3D_resource to camera_3d_resource.gd

* Renamed UpdateButton.tscn
- [Renamed] UpdateButton.tscn to update_button.tscn

* Renamed phantom_camera_gizmo_plugin_3D.gd
- [Renamed] phantom_camera_gizmo_plugin_3D.gd to phantom_camera_gizmo_plugin_3d.gd

* Renamed CustomGizmo.gd
- [Renamed] CustomGizmo.gd to custom_gizmo.gd

* Renamed example scenes to use snake_case

* Renamed image assets and remaining scenes

---------

Co-authored-by: Timur Turatbekov <44378225+P5ina@users.noreply.github.com>
Co-authored-by: ZenithStar <zenithstar@users.noreply.github.com>
ramokz added a commit that referenced this pull request Sep 9, 2024
* Added instance validator on _exit_tree()

* First pass for 3D _validate_property()

* Added additional 3D properties

* Fixed jitter for none physics object (#179)

* Update README.md

* Added a checker for PCam Host when a PCam exits the scene (#175)

* Fixed jitter for none physics object

---------

Co-authored-by: Marcus Skov <Hello@MarcusSkov.com>

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Updated viewfinder.gd

* Minor property reference updates

* Updated phantom_camera_3D.gd and phantom_camera_2D.gd

* Updated plugin.cfg to 0.7

* Updated more properties and example scenes

* Fixed issue with grabbing active_pcam in viewfinder.gd

* Minor updates

* 171 third person quaternion (#190)

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Added quaternion setter/getter for Third Person Follow

* Embedded enums to PCam3D script directly

* Added additional doc comments

* Updated 3D example scenes

* Merged #191 into 0.7

* (Re)added draw limits variable to PCam2D

* Updated script documentation

* Added more properties and signals to PCam scripts
- [Removed] Remaining constant. variable uses
- [Added] dead_zone_changed signal
- [Added] PhantomCameraHost variable to PCam scripts directly
- [Updated] viewfinder.gd with the dead_zone_changed signal change

- [Updated] pcam active setter in PCamHost using setter method

* Added enums directly to tween_resource.gd
- [Added] GDScript descriptions to tween resource properties

* Changed assign_pcam_host to set_pcam_host

* Updated .import files

* Readded Host to Third Person Example scene

* Updated example scenes

* Fixed issue with Limit Margin not updating correctly

* Updated Tween Resource enum names to align with Tween class

* Removed phantom_camera_properties.gd

* Swapped yaw and pitch variable names

* Removed group_names.gd
- [Moved] group_names.gd constants to phantom_camera_constants.gd

* Updated example scenes

* Added Cull Mask Helper Function
- [Added] Setter / Getter for SpringArm3D shape and margin
- [Renamed] Camera3DResource setter/getter names

* Changed reset_limit_all_sides() to reset_limit()

* Removed _camera_3D_resouce_default and tween_resource_default
- [Renamed] spring_arm setters/getters
- [Added] set_collision_mask_value helper function
- [Added] Missing setters/getters

* Fixed UI in 2D example scene

* Removed tween_resource_default from PCam2D

* Updated example scenes

* Fixed issue with limit not working after a tween

* Updated PCam Host setter/getter

* Privitised has_tweened and has_multiple_follow_targets

* Renamed pixel_perfect to snap_to_pixel

* Added look_at_target_changed signal

* Updated many script documentation comments

* Added missing default values to phantom_camera scripts

* Added comments and privatised variables and functions in phantom_camera_host.gd

* Added documentation and editor icon for tween_resource.gd

* Added documentation for camera_3D_resource.gd

* Fixed issue when assigning empty target(s) on editor start

* Updated editor icons and removed unused

* Viewfinder 2d (#220)

* Initial working 2D viewfinder

* Updated gizmo icon
- [Removed] Old Gizmo icon(s)
- [Updated] viewfinder_panel.tscn with improved icon sizing layout

* Improved 2D viewfinder
- [Renamed] Lowercased ...2D and ...3D to 2d/3d in various variable names

* Improved aspect ratio scaler

* Improved viewfinder logic checker

* Removed commented out logic

* CleanED up viewfinder file

- [Removed] editor_interface variables and replaced with singleton Class ref
- [Removed] Unneeded conditional checker and logic

* Simplified scene change signal function

* Solved error with viewfinder
 Now no longer being referenced from export builds

* Updated example scenes

* Added missing PCamHost to 2DExampleScene.tscn

* Initial 3D noise support
- [Added] phantom_camera_noise_3d.gd
- [Added] placeholder phantom_camera_noise_2d.gd
- [Added] 3DNoiseExampleScene.tscn
- [Added] player_controller_first_person.gd
- [Updated] phantom_camera_3D.gd with noise setup
- [Updated] phantom_camera_host.gd with noise setup

* Fixed issue where various setters for _follow_spring_arm didn't get applied at runtime

* Added 2d rotation tween support

* Fixed issue with stacking viewfinder
Occured if you changed from one PCam to another that both used Framed Follow

* Cherry picked changes from main branch

* Added instance validator on _exit_tree()

* First pass for 3D _validate_property()

* Added additional 3D properties

* Fixed jitter for none physics object (#179)

* Update README.md

* Added a checker for PCam Host when a PCam exits the scene (#175)

* Fixed jitter for none physics object

---------

Co-authored-by: Marcus Skov <Hello@MarcusSkov.com>

* Updated viewfinder.gd

* Minor property reference updates

* Updated phantom_camera_3D.gd and phantom_camera_2D.gd

* Updated plugin.cfg to 0.7

* Updated more properties and example scenes

* Minor updates

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* 171 third person quaternion (#190)

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Added quaternion setter/getter for Third Person Follow

* Embedded enums to PCam3D script directly

* Added additional doc comments

* Updated 3D example scenes

* Merged #191 into 0.7

* (Re)added draw limits variable to PCam2D

* Updated script documentation

* Added more properties and signals to PCam scripts
- [Removed] Remaining constant. variable uses
- [Added] dead_zone_changed signal
- [Added] PhantomCameraHost variable to PCam scripts directly
- [Updated] viewfinder.gd with the dead_zone_changed signal change

- [Updated] pcam active setter in PCamHost using setter method

* Added enums directly to tween_resource.gd
- [Added] GDScript descriptions to tween resource properties

* Changed assign_pcam_host to set_pcam_host

* Readded Host to Third Person Example scene

* Updated example scenes

* Fixed issue with Limit Margin not updating correctly

* Updated Tween Resource enum names to align with Tween class

* Removed phantom_camera_properties.gd

* Swapped yaw and pitch variable names

* Removed group_names.gd
- [Moved] group_names.gd constants to phantom_camera_constants.gd

* Updated example scenes

* Added Cull Mask Helper Function
- [Added] Setter / Getter for SpringArm3D shape and margin
- [Renamed] Camera3DResource setter/getter names

* Changed reset_limit_all_sides() to reset_limit()

* Removed _camera_3D_resouce_default and tween_resource_default
- [Renamed] spring_arm setters/getters
- [Added] set_collision_mask_value helper function
- [Added] Missing setters/getters

* Fixed UI in 2D example scene

* Removed tween_resource_default from PCam2D

* Updated example scenes

* Fixed issue with limit not working after a tween

* Updated PCam Host setter/getter

* Privitised has_tweened and has_multiple_follow_targets

* Renamed pixel_perfect to snap_to_pixel

* Added look_at_target_changed signal

* Updated many script documentation comments

* Added missing default values to phantom_camera scripts

* Added comments and privatised variables and functions in phantom_camera_host.gd

* Added documentation and editor icon for tween_resource.gd

* Added documentation for camera_3D_resource.gd

* Fixed issue when assigning empty target(s) on editor start

* Updated editor icons and removed unused

* Viewfinder 2d (#220)

* Initial working 2D viewfinder

* Updated gizmo icon
- [Removed] Old Gizmo icon(s)
- [Updated] viewfinder_panel.tscn with improved icon sizing layout

* Improved 2D viewfinder
- [Renamed] Lowercased ...2D and ...3D to 2d/3d in various variable names

* Improved aspect ratio scaler

* Improved viewfinder logic checker

* Removed commented out logic

* CleanED up viewfinder file

- [Removed] editor_interface variables and replaced with singleton Class ref
- [Removed] Unneeded conditional checker and logic

* Simplified scene change signal function

* Solved error with viewfinder
 Now no longer being referenced from export builds

* Updated example scenes

* Added missing PCamHost to 2DExampleScene.tscn

* Fixed issue where various setters for _follow_spring_arm didn't get applied at runtime

* Added 2d rotation tween support

* Fixed issue with stacking viewfinder
Occured if you changed from one PCam to another that both used Framed Follow

* Cherry picked changes from main branch

* PhantomCameraManager and NoiseEmitter nodes
- [Added] PhantomCameraManager
- [Added] PhantomCameraNoiseEmitter2D
- [Added] PhantomCameraNoiseEmitter3D
- [Updated] Noise example scene and script

* Initial 3D noise support
- [Added] phantom_camera_noise_3d.gd
- [Added] placeholder phantom_camera_noise_2d.gd
- [Added] 3DNoiseExampleScene.tscn
- [Added] player_controller_first_person.gd
- [Updated] phantom_camera_3D.gd with noise setup
- [Updated] phantom_camera_host.gd with noise setup

* PhantomCameraManager and NoiseEmitter nodes
- [Added] PhantomCameraManager
- [Added] PhantomCameraNoiseEmitter2D
- [Added] PhantomCameraNoiseEmitter3D
- [Updated] Noise example scene and script

* Changed space indentation to use tabs

* Move all spring arm initializaiton code out of _process into _ready (#282)

* Move all spring arm initializaiton code out of _process into _ready. Resolves #193

* Making _follow_spring_arm explicitly top_level

* Default _follow_spring_arm.position initialization to the original pcam position if follow_target is not available

* Updated plugin.cfg to 0.7.1

* Change Camera3DResource.cull_mask to use export_flags_3d_render. Resolves #290 (#293)

* Updated scripts and scenes based on changes from Main

* Only show viewfinder if the active PCam's mode is framed (#295)

* Only show viewfinder in the correct follow mode

* Adjust comments

* Reorder early returns

* Remove unneeded type cast

* Updated Editor Updater wording for major releases

* Improved Limit Target error setter

* Added FUNDING.yml

* 2D Follow Physics Interpolation (#294)

* Initial _process / _physics_process logic split

* More 2d physics interpolation supported
- [Added] Interpolation Update Mode to PCamHost
- [Added] Additional warnings

* Commented out 4.3 specific code

* Stripped out a few todo comments

* Removed uneeded checkers

* Added physics body checker for Group Follow

* Added reset_physics_interpolation
- [Updated] Physics Interpolation to use string setters

* Added physics target checker to PCam3D
- [Moved] Follow Targets setters/getters closer to other Follow setters/getters

* Aligned PCam2D' script with PCam3D's

* Added missing variable assignment

* Added missing return for Framed Follow checker

* Removed unneeded boolean flag

* Tidied up process logic

* Added Jitter Tip output

* Added physics checker to Look At Group

* Updated parameter type from NodePath to Node3D

* Updated spacing for setters/getter functions

* Set _player_visual to top level in 2D example scene

* Added additional jitter context

* Phantom Camera Manager (#306)

* Initial _process / _physics_process logic split

* More 2d physics interpolation supported
- [Added] Interpolation Update Mode to PCamHost
- [Added] Additional warnings

* Commented out 4.3 specific code

* Stripped out a few todo comments

* Removed uneeded checkers

* Added physics body checker for Group Follow

* Added reset_physics_interpolation
- [Updated] Physics Interpolation to use string setters

* Added physics target checker to PCam3D
- [Moved] Follow Targets setters/getters closer to other Follow setters/getters

* Aligned PCam2D' script with PCam3D's

* Added missing variable assignment

* Added missing return for Framed Follow checker

* Removed unneeded boolean flag

* Tidied up process logic

* Added Phantom Camera Manager singleton

* Minor fix for when not having a PCam in scene

* Removed print statement

* Fixed merge error

* Removed unneeded print statement

* Improved viewfinder detection (#307)

* Added PCamHost warning when not child of Camera

* Additional camera3d parameters (#308)

* Added additional PhantomCamera3DResource properties

* Shortened Camera3DResource local variable names

* Updated Editor Updater to be less intrusive (#309)

* Conditional checker for Cam3DRes changes

* Added support for disable_3d export templates (#311)

* Merged 0.7.2 changes

* Renamed 3DNoiseExampleScene.tscn to 3d_noise_example_scene.tscn

* Added initial noise properties to PCam 2D

* Noise system refactor

* Added support for stacked noise output

* Removed unneeded transform setter

* Prevent a PCam3D's transform from being contaminated from noise

* Further noise refinements

* Added 2D Noise

* Minor cleanup of Noise 3D

* Synced active PCam with PCamHost's process

* Updated missing transform_output reference

* Aligned noise 2D transform output to match the 3D version's

* Updated noise 2d example scene

* Made Third Person Follow compatible with the transform_output

* Updated transform output in phantom_camera_2d.gd

---------

Co-authored-by: Timur Turatbekov <44378225+P5ina@users.noreply.github.com>
Co-authored-by: ZenithStar <zenithstar@users.noreply.github.com>
Co-authored-by: audeck <55060124+audeck@users.noreply.github.com>
ramokz added a commit that referenced this pull request Oct 18, 2024
* Camera noise (#380)

* Added instance validator on _exit_tree()

* First pass for 3D _validate_property()

* Added additional 3D properties

* Fixed jitter for none physics object (#179)

* Update README.md

* Added a checker for PCam Host when a PCam exits the scene (#175)

* Fixed jitter for none physics object

---------

Co-authored-by: Marcus Skov <Hello@MarcusSkov.com>

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Updated viewfinder.gd

* Minor property reference updates

* Updated phantom_camera_3D.gd and phantom_camera_2D.gd

* Updated plugin.cfg to 0.7

* Updated more properties and example scenes

* Fixed issue with grabbing active_pcam in viewfinder.gd

* Minor updates

* 171 third person quaternion (#190)

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Added quaternion setter/getter for Third Person Follow

* Embedded enums to PCam3D script directly

* Added additional doc comments

* Updated 3D example scenes

* Merged #191 into 0.7

* (Re)added draw limits variable to PCam2D

* Updated script documentation

* Added more properties and signals to PCam scripts
- [Removed] Remaining constant. variable uses
- [Added] dead_zone_changed signal
- [Added] PhantomCameraHost variable to PCam scripts directly
- [Updated] viewfinder.gd with the dead_zone_changed signal change

- [Updated] pcam active setter in PCamHost using setter method

* Added enums directly to tween_resource.gd
- [Added] GDScript descriptions to tween resource properties

* Changed assign_pcam_host to set_pcam_host

* Updated .import files

* Readded Host to Third Person Example scene

* Updated example scenes

* Fixed issue with Limit Margin not updating correctly

* Updated Tween Resource enum names to align with Tween class

* Removed phantom_camera_properties.gd

* Swapped yaw and pitch variable names

* Removed group_names.gd
- [Moved] group_names.gd constants to phantom_camera_constants.gd

* Updated example scenes

* Added Cull Mask Helper Function
- [Added] Setter / Getter for SpringArm3D shape and margin
- [Renamed] Camera3DResource setter/getter names

* Changed reset_limit_all_sides() to reset_limit()

* Removed _camera_3D_resouce_default and tween_resource_default
- [Renamed] spring_arm setters/getters
- [Added] set_collision_mask_value helper function
- [Added] Missing setters/getters

* Fixed UI in 2D example scene

* Removed tween_resource_default from PCam2D

* Updated example scenes

* Fixed issue with limit not working after a tween

* Updated PCam Host setter/getter

* Privitised has_tweened and has_multiple_follow_targets

* Renamed pixel_perfect to snap_to_pixel

* Added look_at_target_changed signal

* Updated many script documentation comments

* Added missing default values to phantom_camera scripts

* Added comments and privatised variables and functions in phantom_camera_host.gd

* Added documentation and editor icon for tween_resource.gd

* Added documentation for camera_3D_resource.gd

* Fixed issue when assigning empty target(s) on editor start

* Updated editor icons and removed unused

* Viewfinder 2d (#220)

* Initial working 2D viewfinder

* Updated gizmo icon
- [Removed] Old Gizmo icon(s)
- [Updated] viewfinder_panel.tscn with improved icon sizing layout

* Improved 2D viewfinder
- [Renamed] Lowercased ...2D and ...3D to 2d/3d in various variable names

* Improved aspect ratio scaler

* Improved viewfinder logic checker

* Removed commented out logic

* CleanED up viewfinder file

- [Removed] editor_interface variables and replaced with singleton Class ref
- [Removed] Unneeded conditional checker and logic

* Simplified scene change signal function

* Solved error with viewfinder
 Now no longer being referenced from export builds

* Updated example scenes

* Added missing PCamHost to 2DExampleScene.tscn

* Initial 3D noise support
- [Added] phantom_camera_noise_3d.gd
- [Added] placeholder phantom_camera_noise_2d.gd
- [Added] 3DNoiseExampleScene.tscn
- [Added] player_controller_first_person.gd
- [Updated] phantom_camera_3D.gd with noise setup
- [Updated] phantom_camera_host.gd with noise setup

* Fixed issue where various setters for _follow_spring_arm didn't get applied at runtime

* Added 2d rotation tween support

* Fixed issue with stacking viewfinder
Occured if you changed from one PCam to another that both used Framed Follow

* Cherry picked changes from main branch

* Added instance validator on _exit_tree()

* First pass for 3D _validate_property()

* Added additional 3D properties

* Fixed jitter for none physics object (#179)

* Update README.md

* Added a checker for PCam Host when a PCam exits the scene (#175)

* Fixed jitter for none physics object

---------

Co-authored-by: Marcus Skov <Hello@MarcusSkov.com>

* Updated viewfinder.gd

* Minor property reference updates

* Updated phantom_camera_3D.gd and phantom_camera_2D.gd

* Updated plugin.cfg to 0.7

* Updated more properties and example scenes

* Minor updates

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* 171 third person quaternion (#190)

* Updated CharacterControllers to support changed camera movement interpolation.

* Removed unneeded interpolation from phantom_camera_3D.gd

* Added quaternion setter/getter for Third Person Follow

* Embedded enums to PCam3D script directly

* Added additional doc comments

* Updated 3D example scenes

* Merged #191 into 0.7

* (Re)added draw limits variable to PCam2D

* Updated script documentation

* Added more properties and signals to PCam scripts
- [Removed] Remaining constant. variable uses
- [Added] dead_zone_changed signal
- [Added] PhantomCameraHost variable to PCam scripts directly
- [Updated] viewfinder.gd with the dead_zone_changed signal change

- [Updated] pcam active setter in PCamHost using setter method

* Added enums directly to tween_resource.gd
- [Added] GDScript descriptions to tween resource properties

* Changed assign_pcam_host to set_pcam_host

* Readded Host to Third Person Example scene

* Updated example scenes

* Fixed issue with Limit Margin not updating correctly

* Updated Tween Resource enum names to align with Tween class

* Removed phantom_camera_properties.gd

* Swapped yaw and pitch variable names

* Removed group_names.gd
- [Moved] group_names.gd constants to phantom_camera_constants.gd

* Updated example scenes

* Added Cull Mask Helper Function
- [Added] Setter / Getter for SpringArm3D shape and margin
- [Renamed] Camera3DResource setter/getter names

* Changed reset_limit_all_sides() to reset_limit()

* Removed _camera_3D_resouce_default and tween_resource_default
- [Renamed] spring_arm setters/getters
- [Added] set_collision_mask_value helper function
- [Added] Missing setters/getters

* Fixed UI in 2D example scene

* Removed tween_resource_default from PCam2D

* Updated example scenes

* Fixed issue with limit not working after a tween

* Updated PCam Host setter/getter

* Privitised has_tweened and has_multiple_follow_targets

* Renamed pixel_perfect to snap_to_pixel

* Added look_at_target_changed signal

* Updated many script documentation comments

* Added missing default values to phantom_camera scripts

* Added comments and privatised variables and functions in phantom_camera_host.gd

* Added documentation and editor icon for tween_resource.gd

* Added documentation for camera_3D_resource.gd

* Fixed issue when assigning empty target(s) on editor start

* Updated editor icons and removed unused

* Viewfinder 2d (#220)

* Initial working 2D viewfinder

* Updated gizmo icon
- [Removed] Old Gizmo icon(s)
- [Updated] viewfinder_panel.tscn with improved icon sizing layout

* Improved 2D viewfinder
- [Renamed] Lowercased ...2D and ...3D to 2d/3d in various variable names

* Improved aspect ratio scaler

* Improved viewfinder logic checker

* Removed commented out logic

* CleanED up viewfinder file

- [Removed] editor_interface variables and replaced with singleton Class ref
- [Removed] Unneeded conditional checker and logic

* Simplified scene change signal function

* Solved error with viewfinder
 Now no longer being referenced from export builds

* Updated example scenes

* Added missing PCamHost to 2DExampleScene.tscn

* Fixed issue where various setters for _follow_spring_arm didn't get applied at runtime

* Added 2d rotation tween support

* Fixed issue with stacking viewfinder
Occured if you changed from one PCam to another that both used Framed Follow

* Cherry picked changes from main branch

* PhantomCameraManager and NoiseEmitter nodes
- [Added] PhantomCameraManager
- [Added] PhantomCameraNoiseEmitter2D
- [Added] PhantomCameraNoiseEmitter3D
- [Updated] Noise example scene and script

* Initial 3D noise support
- [Added] phantom_camera_noise_3d.gd
- [Added] placeholder phantom_camera_noise_2d.gd
- [Added] 3DNoiseExampleScene.tscn
- [Added] player_controller_first_person.gd
- [Updated] phantom_camera_3D.gd with noise setup
- [Updated] phantom_camera_host.gd with noise setup

* PhantomCameraManager and NoiseEmitter nodes
- [Added] PhantomCameraManager
- [Added] PhantomCameraNoiseEmitter2D
- [Added] PhantomCameraNoiseEmitter3D
- [Updated] Noise example scene and script

* Changed space indentation to use tabs

* Move all spring arm initializaiton code out of _process into _ready (#282)

* Move all spring arm initializaiton code out of _process into _ready. Resolves #193

* Making _follow_spring_arm explicitly top_level

* Default _follow_spring_arm.position initialization to the original pcam position if follow_target is not available

* Updated plugin.cfg to 0.7.1

* Change Camera3DResource.cull_mask to use export_flags_3d_render. Resolves #290 (#293)

* Updated scripts and scenes based on changes from Main

* Only show viewfinder if the active PCam's mode is framed (#295)

* Only show viewfinder in the correct follow mode

* Adjust comments

* Reorder early returns

* Remove unneeded type cast

* Updated Editor Updater wording for major releases

* Improved Limit Target error setter

* Added FUNDING.yml

* 2D Follow Physics Interpolation (#294)

* Initial _process / _physics_process logic split

* More 2d physics interpolation supported
- [Added] Interpolation Update Mode to PCamHost
- [Added] Additional warnings

* Commented out 4.3 specific code

* Stripped out a few todo comments

* Removed uneeded checkers

* Added physics body checker for Group Follow

* Added reset_physics_interpolation
- [Updated] Physics Interpolation to use string setters

* Added physics target checker to PCam3D
- [Moved] Follow Targets setters/getters closer to other Follow setters/getters

* Aligned PCam2D' script with PCam3D's

* Added missing variable assignment

* Added missing return for Framed Follow checker

* Removed unneeded boolean flag

* Tidied up process logic

* Added Jitter Tip output

* Added physics checker to Look At Group

* Updated parameter type from NodePath to Node3D

* Updated spacing for setters/getter functions

* Set _player_visual to top level in 2D example scene

* Added additional jitter context

* Phantom Camera Manager (#306)

* Initial _process / _physics_process logic split

* More 2d physics interpolation supported
- [Added] Interpolation Update Mode to PCamHost
- [Added] Additional warnings

* Commented out 4.3 specific code

* Stripped out a few todo comments

* Removed uneeded checkers

* Added physics body checker for Group Follow

* Added reset_physics_interpolation
- [Updated] Physics Interpolation to use string setters

* Added physics target checker to PCam3D
- [Moved] Follow Targets setters/getters closer to other Follow setters/getters

* Aligned PCam2D' script with PCam3D's

* Added missing variable assignment

* Added missing return for Framed Follow checker

* Removed unneeded boolean flag

* Tidied up process logic

* Added Phantom Camera Manager singleton

* Minor fix for when not having a PCam in scene

* Removed print statement

* Fixed merge error

* Removed unneeded print statement

* Improved viewfinder detection (#307)

* Added PCamHost warning when not child of Camera

* Additional camera3d parameters (#308)

* Added additional PhantomCamera3DResource properties

* Shortened Camera3DResource local variable names

* Updated Editor Updater to be less intrusive (#309)

* Conditional checker for Cam3DRes changes

* Added support for disable_3d export templates (#311)

* Merged 0.7.2 changes

* Renamed 3DNoiseExampleScene.tscn to 3d_noise_example_scene.tscn

* Added initial noise properties to PCam 2D

* Noise system refactor

* Added support for stacked noise output

* Removed unneeded transform setter

* Prevent a PCam3D's transform from being contaminated from noise

* Further noise refinements

* Added 2D Noise

* Minor cleanup of Noise 3D

* Synced active PCam with PCamHost's process

* Updated missing transform_output reference

* Aligned noise 2D transform output to match the 3D version's

* Updated noise 2d example scene

* Made Third Person Follow compatible with the transform_output

* Updated transform output in phantom_camera_2d.gd

---------

Co-authored-by: Timur Turatbekov <44378225+P5ina@users.noreply.github.com>
Co-authored-by: ZenithStar <zenithstar@users.noreply.github.com>
Co-authored-by: audeck <55060124+audeck@users.noreply.github.com>

* Prevent crash when freeing target parent (#381)

* Improved follow target being cleared

* Improved 2D follow target being cleared

* Changed variable name to _follow_target_is_tree_exiting

* Improved look at target being cleared

* Improved clearing targets for Group Follow and Group Look At

* Minor addition to previous commit

* Added dead_zone_reached signal (#382)

* Resolved viewfinder error spam log (#386)

* Updated copy in _check_physics_body

* Refactored how targets are store and referenced in phantom_camera_3d.gd

* Fixed an issue with look at damping not working

* Refactored how targets are stored and referenced in phantom_camera_2d.gd

* Updated plugin.cfg to 0.7.9

* Updated Path Follow reference with refactored system

* Added _should_follow_checker to validate follow target

* Resolved 2D Framed View change from pre-0.8 branch

* Updated dev scenes

* Updated dev scene scripts

* Added Phantom Camera Noise icons

* Made the Noise system more flexible

* Updated Noise behaviour

* Set Noise Rotation Z default to 0

* Updated 3D Noise Example Scene

* Updated 2D Noise Example Scene

* Updated 2D Example Scenes

* Updated 3D Example Scenes

* Prevent updater from updating to pre-releases

* Minor update to 2d_limit_example_scene.tscn

* Minor update to viewfinder_panel.tscn

* Updated player_sprite.svg to a 128x128 size

* Minor check fix

* Assigned TileMapLayer as initial limit target

* Minor noise example scene changes

* Added private _follow_targets variable

* Minor 3d noise examples

* Prevented _follow_targets_size_check from being checked when not Group Follow

* Only show Auto Follow Distance properties when appropriate

* Only show Auto Zoom properties when appropriate

* Reverted spring_arm add_child method to use parent node instead of scene root

* Resolved "data.tree" is null error due to camera_2d physics interpolation being set to off

* Resolved process_callback change warning
Happens if physics interpolation is enabled from Project Settings

* Minor changes

* Fixed issue when setting Follow Mode without a target

* Updated player_character_body_2d_4.3.gd to use TileMapLayer

* Updated dev_scene_2d.tscn

* Ignore_rotation checker for Noise2D

* Added setters and getters for Noise Resources

* Added setters & getters to Noise Emitters

* Minor dev_scene_3d.tscn change

* Updated noise example scenes

* Added additional GDScript documentation to Noise files

* Assigned default value to noise property

---------

Co-authored-by: Timur Turatbekov <44378225+P5ina@users.noreply.github.com>
Co-authored-by: ZenithStar <zenithstar@users.noreply.github.com>
Co-authored-by: audeck <55060124+audeck@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jittery camera movement
3 participants