Skip to content
Snippets Groups Projects
Commit e6173555 authored by Fabian Keßler's avatar Fabian Keßler
Browse files

Fix polygon edge

parent 661a32b1
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,10 @@ func _ready() -> void: ...@@ -32,6 +32,10 @@ func _ready() -> void:
check_for_drown(poly) check_for_drown(poly)
func _process(delta: float) -> void:
var offset = Vector2(0, 10).rotated(polygon_node.rotation)
shadow_polygon_node.global_position = polygon_node.global_position + offset
func check_for_drown(poly): func check_for_drown(poly):
$ShadowPolygon2D.material = $ShadowPolygon2D.material.duplicate(true) $ShadowPolygon2D.material = $ShadowPolygon2D.material.duplicate(true)
if polygon_area(poly) < min_area: if polygon_area(poly) < min_area:
......
[gd_scene load_steps=10 format=3 uid="uid://ch1i0q8d6r4f0"] [gd_scene load_steps=10 format=3 uid="uid://ch1i0q8d6r4f0"]
[ext_resource type="Script" path="res://schollen_spektakel.gd" id="1_ij3xc"] [ext_resource type="Script" uid="uid://cik8umdfv5587" path="res://schollen_spektakel.gd" id="1_ij3xc"]
[ext_resource type="PackedScene" uid="uid://d1vv1o7g2lp01" path="res://water/water.tscn" id="2_hycu0"] [ext_resource type="PackedScene" uid="uid://d1vv1o7g2lp01" path="res://water/water.tscn" id="2_hycu0"]
[ext_resource type="PackedScene" uid="uid://diilm3qbp1tly" path="res://ice_floe/ice_floe.tscn" id="2_ij3xc"] [ext_resource type="PackedScene" uid="uid://diilm3qbp1tly" path="res://ice_floe/ice_floe.tscn" id="2_ij3xc"]
[ext_resource type="PackedScene" uid="uid://b23bxmjrcknm3" path="res://center_pos.tscn" id="4_6ndi4"] [ext_resource type="PackedScene" uid="uid://b23bxmjrcknm3" path="res://center_pos.tscn" id="4_6ndi4"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment