betere collision shapes, wat cleanup
This commit is contained in:
+26
-13
File diff suppressed because one or more lines are too long
+5
-4
File diff suppressed because one or more lines are too long
+5
-4
File diff suppressed because one or more lines are too long
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bjbpkdxe3m235" path="res://Objects/Meshes/ladekast.glb" id="1_gw865"]
|
[ext_resource type="PackedScene" uid="uid://bjbpkdxe3m235" path="res://Objects/Meshes/ladekast.glb" id="1_gw865"]
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_oani2"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_qmmg3"]
|
||||||
points = PackedVector3Array(0.881012, 1.2404, -0.991939, 0.971999, 2.0762, 0.989799, -0.976627, 2.0762, 0.989799, -0.88564, 1.2404, 0.991939, -0.976627, 2.0762, -0.989799, 0.971999, 2.0762, -0.989799, 0.881012, 1.2404, 0.991939, -0.88564, 1.2404, -0.991939, 0.977697, 1.89201, -0.995589, -0.981442, 1.92293, 0.994691, 0.913748, 1.36385, 0.993858, -0.981442, 1.92293, -0.994691, 0.977697, 1.89201, 0.995589, -0.917534, 1.39512, -0.992944, 0.913748, 1.36385, -0.993858, -0.917534, 1.39512, 0.992944)
|
size = Vector3(2, 5, 2)
|
||||||
|
|
||||||
[node name="ladekast" instance=ExtResource("1_gw865")]
|
[node name="ladekast" instance=ExtResource("1_gw865")]
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="Kast" index="5"]
|
[node name="StaticBody3D" type="StaticBody3D" parent="Kast" index="5"]
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Kast/StaticBody3D" index="0"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Kast/StaticBody3D" index="0"]
|
||||||
shape = SubResource("ConvexPolygonShape3D_oani2")
|
shape = SubResource("BoxShape3D_qmmg3")
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ shape = SubResource("BoxShape3D_hprjx")
|
|||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
[node name="Music" type="AudioStreamPlayer3D" parent="." index="5"]
|
[node name="Music" type="AudioStreamPlayer3D" parent="." index="5"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.39983, 0.16465, -2.32134)
|
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -2.39983, 0.16465, -2.32134)
|
||||||
stream = ExtResource("3_qep0f")
|
stream = ExtResource("3_qep0f")
|
||||||
|
unit_size = 3.6
|
||||||
|
attenuation_filter_db = -34.0
|
||||||
|
|
||||||
[connection signal="input_event" from="Knop/Knop" to="." method="_on_knop_input_event"]
|
[connection signal="input_event" from="Knop/Knop" to="." method="_on_knop_input_event"]
|
||||||
[connection signal="finished" from="Music" to="." method="_on_music_finished"]
|
[connection signal="finished" from="Music" to="." method="_on_music_finished"]
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ radius = 0.3
|
|||||||
height = 1.6
|
height = 1.6
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_2j6of"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_2j6of"]
|
||||||
|
radius = 0.3
|
||||||
|
|
||||||
[node name="Player" type="CharacterBody3D"]
|
[node name="Player" type="CharacterBody3D"]
|
||||||
script = ExtResource("1_jx17t")
|
script = ExtResource("1_jx17t")
|
||||||
|
|||||||
+2
-4
@@ -1,11 +1,10 @@
|
|||||||
@tool
|
@tool
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
const SIZE = 4
|
const SIZE = 5
|
||||||
enum Direction {UP, RIGHT, DOWN, LEFT}
|
enum Direction {UP, RIGHT, DOWN, LEFT}
|
||||||
var sequence = []
|
var sequence = []
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
func _ready():
|
||||||
randomize()
|
randomize()
|
||||||
|
|
||||||
@@ -23,13 +22,12 @@ func _ready():
|
|||||||
for i in range(dir):
|
for i in range(dir):
|
||||||
arrow.rotate_90(0)
|
arrow.rotate_90(0)
|
||||||
painting.blit_rect(arrow, arrow.get_used_rect() ,Vector2i(x*128, y*128))
|
painting.blit_rect(arrow, arrow.get_used_rect() ,Vector2i(x*128, y*128))
|
||||||
if randi() % 4 == 0:
|
if randi() % SIZE == 0:
|
||||||
painting_em.blit_rect(arrow, arrow.get_used_rect() ,Vector2i(x*128, y*128))
|
painting_em.blit_rect(arrow, arrow.get_used_rect() ,Vector2i(x*128, y*128))
|
||||||
sequence.append(dir)
|
sequence.append(dir)
|
||||||
for i in range(4-dir):
|
for i in range(4-dir):
|
||||||
arrow.rotate_90(0)
|
arrow.rotate_90(0)
|
||||||
|
|
||||||
|
|
||||||
var texture = ImageTexture.create_from_image(painting)
|
var texture = ImageTexture.create_from_image(painting)
|
||||||
$Canvas.get_surface_override_material(0).albedo_texture = texture
|
$Canvas.get_surface_override_material(0).albedo_texture = texture
|
||||||
var texture_em = ImageTexture.create_from_image(painting_em)
|
var texture_em = ImageTexture.create_from_image(painting_em)
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ func _physics_process(delta):
|
|||||||
velocity.z = direction.z * WALK_SPEED
|
velocity.z = direction.z * WALK_SPEED
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|
||||||
|
|
||||||
func _on_flash_light_input_event(camera, event, position, normal, shape_idx):
|
func _on_flash_light_input_event(camera, event, position, normal, shape_idx):
|
||||||
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
||||||
$Pivot/Camera/FlashLight.visible = true
|
$Pivot/Camera/FlashLight.visible = true
|
||||||
|
|||||||
+1
-2
@@ -4,7 +4,7 @@ var combination
|
|||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
combination = randi() % 10000
|
combination = randi() % 10000
|
||||||
$".."/CombiCode.mesh.text = str(combination)
|
$".."/CombiCode.mesh.text = "%04d" % combination #met leading 0'en
|
||||||
|
|
||||||
func get_number():
|
func get_number():
|
||||||
return 1000 * $Body/"1"/Cylinder/StaticBody3D.number + \
|
return 1000 * $Body/"1"/Cylinder/StaticBody3D.number + \
|
||||||
@@ -12,7 +12,6 @@ func get_number():
|
|||||||
10 * $Body/"3"/Cylinder/StaticBody3D.number + \
|
10 * $Body/"3"/Cylinder/StaticBody3D.number + \
|
||||||
$Body/"4"/Cylinder/StaticBody3D.number
|
$Body/"4"/Cylinder/StaticBody3D.number
|
||||||
|
|
||||||
|
|
||||||
func _on_static_body_3d_input_event(camera, event, position, normal, shape_idx):
|
func _on_static_body_3d_input_event(camera, event, position, normal, shape_idx):
|
||||||
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
||||||
$Body/Knop/Audio.playing = true
|
$Body/Knop/Audio.playing = true
|
||||||
|
|||||||
Reference in New Issue
Block a user