-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Unable to animate CameraAttributesPractical inside a PhantomCamera3D node in game #388
Comments
This is a known limitation with the current system. At the minute, the system cannot update the I haven't been able to find a performant way of doing this during runtime, as I can't quite see a way to only update the |
I am currently getting around it by setting the process mode of the host to DISABLED and then controlling the camera directly using Animation player. |
Funny that a few of us are running into this all at the same time 😄 🎥
I'd be okay with a function that we could call on
This does work. Here's what I ended up with: var host_camera_attributes := (
phantom_camera.pcam_host_owner.camera_3d.attributes as CameraAttributesPractical
)
if phantom_camera.is_active():
host_camera_attributes.dof_blur_near_enabled = true
var target_blur = 2.0 if aiming else 0.0
host_camera_attributes.dof_blur_near_distance = lerpf(
host_camera_attributes.dof_blur_near_distance, target_blur, delta * 10
)
else:
host_camera_attributes.dof_blur_near_enabled = false
host_camera_attributes.dof_blur_near_distance = 0.0 I currently only have one camera that I need the blur on, but I could see this getting a bit complicated if you want to have different values that are animated in code for different cameras. |
So have managed to find an approach to getting this to work automatically. Where the user doesn't have to do anything else but change the For now, I would be okay with introducing a manual approach, via a function like mentioned, to bridge the current functionality gap. |
Issue description
I have an AnimationPlayer controlling a PhantomCamera3D node, which has CameraAttributesPractical. I have exposure, and dof animations in the player which play nicely when in the editor. But these attribute animations don't work when running the game.
Steps to reproduce
Add an Camera3D with a PCamHost, a PhantomCamera3D node and an AnimationPlayer (with MeshInstance3Ds to view something). Animate the PhantomCamera3D position, rotation and attributes. The animation plays properly in editor, but in game only the position and rotation animations play and not the attributes.
(Optional) Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: