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

Tweening of FOV/Near/Far properties ends on incorrect values #326

Closed
NullShock78 opened this issue Jun 10, 2024 · 3 comments · Fixed by #330
Closed

Tweening of FOV/Near/Far properties ends on incorrect values #326

NullShock78 opened this issue Jun 10, 2024 · 3 comments · Fixed by #330

Comments

@NullShock78
Copy link

Issue description

When tweening between two PhantomCamera3Ds with different FOV/Near/Far settings, the final values are not equal to the ones defined in the target's Camera3DResource

Steps to reproduce

  1. Have a Camera3D with a PhantomCameraHost, and two PhantomCamera3D nodes with different FOV/Near/Far settings in their Camera3DResources
  2. Activate a tween between the two PhantomCamera3Ds
  3. After the tween finishes, go into the Remote scene tree and compare the FOV/Near/Far values on the Camera3D node to what is defined in the current PhantomCamera3D's Camera3DResource.

(Optional) Minimal reproduction project

No response

@ramokz
Copy link
Owner

ramokz commented Jun 10, 2024

I can't seem to replicate the issue.
Would you be able to either share a recording or a minimal reproducible project sample?

Test below:

Camera3DResource for PlayerPCam:

  • fov: 75
  • near: 0.05
  • far: 2000

Camera3DResource for ScenePCam:

  • fov: 10
  • near: 0.08
  • far: 6000
fov_near_far_tween.mp4

@NullShock78
Copy link
Author

NullShock78 commented Jun 10, 2024

Uploaded a minimal example project
Might be framerate dependent, so max fps is set in the project
Edit: attached video

2024-06-10.18-50-54.mp4

@ramokz
Copy link
Owner

ramokz commented Jun 13, 2024

The issue seems to partially stem from setting the priority in the _ready() of the root node.
If you replace the PhantomCameraHost.gd file with the version below, then that should resolve it.
It basically boils down to always running the last frame of a tween, which it sometimes skips — likely due to the fluctuating delta value.

phantom_camera_host.gd.zip

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 a pull request may close this issue.

2 participants