Skip to content

Commit

Permalink
Sync environment and attributes for Camera3D (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyec authored Jan 17, 2024
1 parent 6c55b0f commit 73edc84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/anthonyec.camera_preview/preview.gd
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ func _process(_delta: float) -> void:
preview_camera_3d.far = selected_camera_3d.far
preview_camera_3d.h_offset = selected_camera_3d.h_offset
preview_camera_3d.v_offset = selected_camera_3d.v_offset
preview_camera_3d.attributes = selected_camera_3d.attributes
preview_camera_3d.environment = selected_camera_3d.environment

if camera_type == CameraType.CAMERA_2D and selected_camera_2d:
var ratio = window_width / panel.size.x
Expand Down
4 changes: 4 additions & 0 deletions demo/main_3d.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ fov = 59.0625
[node name="Camera3D2" type="Camera3D" parent="."]
transform = Transform3D(-0.270463, 0.615613, -0.740183, 0.000464575, 0.768921, 0.639344, 0.96273, 0.172575, -0.208251, -2.46042, 3.01318, -1.48917)
fov = 69.4097

[node name="Camera3D3" type="Camera3D" parent="."]
transform = Transform3D(0.716911, 0.00464808, 0.69715, 1.1914e-10, 0.999978, -0.00666711, -0.697165, 0.00477972, 0.716895, 8.21847, 1.01507, 7.42971)
fov = 19.3989

0 comments on commit 73edc84

Please sign in to comment.