diff --git a/main.tscn b/main.tscn index 4adcdc5..6cc880f 100755 --- a/main.tscn +++ b/main.tscn @@ -13,9 +13,9 @@ ambient_light_color = Color(0, 0, 0.31764707, 1) ambient_light_energy = 0.3 -[sub_resource type="CylinderShape3D" id="CylinderShape3D_7mycd"] -height = 0.5 +[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_player"] radius = 0.16 +height = 0.5 [sub_resource type="AtlasTexture" id="AtlasTexture_lquwl"] atlas = ExtResource("2_h2yge") @@ -177,11 +177,11 @@ environment = SubResource("Environment_h2yge") script = ExtResource("1_terrain") [node name="Player" type="CharacterBody3D" parent="." unique_id=1504574304 groups=["player"]] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) script = ExtResource("1_0xm2m") [node name="CollisionShape3D" type="CollisionShape3D" parent="Player" unique_id=1483851051] -shape = SubResource("CylinderShape3D_7mycd") +shape = SubResource("CapsuleShape3D_player") [node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="Player" unique_id=155581900] billboard = 2 diff --git a/terrain.gd b/terrain.gd index 145f79f..08f869d 100644 --- a/terrain.gd +++ b/terrain.gd @@ -84,7 +84,9 @@ func _build_crown() -> void: mi.mesh = mesh body.add_child(mi) var cs := CollisionShape3D.new() - cs.shape = mesh.create_trimesh_shape() + var trimesh := mesh.create_trimesh_shape() + trimesh.backface_collision = true # dünnes Mesh: von beiden Seiten kollidieren, kein Durchfallen + cs.shape = trimesh body.add_child(cs) add_child(body)