Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion material_maker/panels/preview_3d/preview_3d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func on_gui_input(event : InputEvent) -> void:
else:
motion.y = 0
var camera_basis = camera.global_transform.basis
var objects_rotation : int = -1 if Input.is_key_pressed(KEY_CTRL) else 1 if Input.is_key_pressed(KEY_SHIFT) else 0
var objects_rotation : int = -1 if Input.is_key_pressed(KEY_CTRL) else 0
if event.button_mask & MOUSE_BUTTON_MASK_LEFT:
objects_pivot.rotate(camera_basis.x.normalized(), objects_rotation * motion.y)
objects_pivot.rotate(camera_basis.y.normalized(), objects_rotation * motion.x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ func process_event(event : InputEvent, viewport : Viewport = null) -> bool:
camera_rotation2.rotate_x(-0.01*event.relative.y)
camera_rotation1.rotate_y(-0.01*event.relative.x)
return true
elif event.button_mask & MOUSE_BUTTON_MASK_RIGHT != 0:
if event.shift_pressed:
var world_env : WorldEnvironment = get_node("../WorldEnvironment")
world_env.environment.sky_rotation.y += event.relative.x * 0.001
return false
elif event is InputEventMouseButton:
if not event.is_command_or_control_pressed():
var zoom = 0.0
Expand Down
Loading