Hi!
There is a problem with split screen and mouse action.
There is a script on unit:
func _on_Worker_mouse_entered():
print("mouse enter")
is_mouse_in = true
sprite_shadow.visible=true
It works good, but if I use Viewport it doesn't work at all.
Code of Viewport node:
onready var VP_left = $ViewportContainer/Viewport
onready var VP_right = $ViewportContainer2/Viewport2
func _ready():
var tmp = VP_left.find_world_2d()
VP_right.world_2d=tmp
Scene with Viewports is a main one. Than I create scene with the map, and in this scene I create a workers.
If only half of a screen is a viewport and another one is.. mm.. dont know how to say.. oroginal view. mouse action works in original view but doesn't in viewport.
