diff --git a/3d/squash_the_creeps/Main.tscn b/3d/squash_the_creeps/Main.tscn index ba6855af54..ae26fe4a7d 100644 --- a/3d/squash_the_creeps/Main.tscn +++ b/3d/squash_the_creeps/Main.tscn @@ -4,7 +4,7 @@ [ext_resource type="PackedScene" uid="uid://dp478jyugrn7o" path="res://Player.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://ha0ar5s2c3m4" path="res://Mob.tscn" id="3"] [ext_resource type="Theme" uid="uid://cqquurjk1i7yw" path="res://ui_theme.tres" id="4_gnyca"] -[ext_resource type="Script" path="res://ScoreLabel.gd" id="6"] +[ext_resource type="Script" uid="uid://bb26jybfvgwdk" path="res://ScoreLabel.gd" id="6"] [sub_resource type="BoxShape3D" id="1"] size = Vector3(60, 2, 60) diff --git a/3d/squash_the_creeps/Mob.gd b/3d/squash_the_creeps/Mob.gd index 168dc545af..ddfbf2606e 100644 --- a/3d/squash_the_creeps/Mob.gd +++ b/3d/squash_the_creeps/Mob.gd @@ -14,7 +14,13 @@ func _physics_process(_delta): func initialize(start_position, player_position): - look_at_from_position(start_position, player_position, Vector3.UP) + # Ignore the player's height, so that the mob's orientation is not slightly + # shifted if the mob spawns while the player is jumping. + var target = Vector3(player_position.x, start_position.y, player_position.z) + look_at_from_position(start_position, target, Vector3.UP) + + # Rotate this mob randomly within range of -45 and +45 degrees, + # so that it doesn't move directly towards the player. rotate_y(randf_range(-PI / 4, PI / 4)) var random_speed = randf_range(min_speed, max_speed) diff --git a/3d/squash_the_creeps/art/mob.glb.import b/3d/squash_the_creeps/art/mob.glb.import index d0387fd563..58ae1100b5 100644 --- a/3d/squash_the_creeps/art/mob.glb.import +++ b/3d/squash_the_creeps/art/mob.glb.import @@ -17,6 +17,7 @@ nodes/root_type="Spatial" nodes/root_name="Scene Root" nodes/apply_root_scale=true nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false meshes/ensure_tangents=true meshes/generate_lods=false meshes/create_shadow_meshes=true @@ -28,6 +29,7 @@ animation/import=true animation/fps=15 animation/trimming=false animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false import_script/path="" _subresources={} gltf/naming_version=0 diff --git a/3d/squash_the_creeps/art/player.glb.import b/3d/squash_the_creeps/art/player.glb.import index 52f12df0f8..4bc370367b 100644 --- a/3d/squash_the_creeps/art/player.glb.import +++ b/3d/squash_the_creeps/art/player.glb.import @@ -17,6 +17,7 @@ nodes/root_type="Spatial" nodes/root_name="Scene Root" nodes/apply_root_scale=true nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false meshes/ensure_tangents=true meshes/generate_lods=false meshes/create_shadow_meshes=true @@ -28,6 +29,7 @@ animation/import=true animation/fps=15 animation/trimming=false animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false import_script/path="" _subresources={} gltf/naming_version=0 diff --git a/3d/squash_the_creeps/fonts/Montserrat-Medium.ttf.import b/3d/squash_the_creeps/fonts/Montserrat-Medium.ttf.import index 4640bc8e96..d33721780d 100644 --- a/3d/squash_the_creeps/fonts/Montserrat-Medium.ttf.import +++ b/3d/squash_the_creeps/fonts/Montserrat-Medium.ttf.import @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Montserrat-Medium.ttf-e832861e4ad4110e172112d Rendering=null antialiasing=1 generate_mipmaps=false +disable_embedded_bitmaps=true multichannel_signed_distance_field=false msdf_pixel_range=8 msdf_size=48 diff --git a/3d/squash_the_creeps/project.godot b/3d/squash_the_creeps/project.godot index fc70f0c57e..4a498b3488 100644 --- a/3d/squash_the_creeps/project.godot +++ b/3d/squash_the_creeps/project.godot @@ -17,7 +17,7 @@ This is a finished version of the game featured in the \"Your first 3D game\" tutorial in the official documentation." config/tags=PackedStringArray("3d", "demo", "official") run/main_scene="res://Main.tscn" -config/features=PackedStringArray("4.2") +config/features=PackedStringArray("4.3") config/icon="res://icon.webp" [autoload] @@ -37,35 +37,35 @@ import/blender/enabled=false move_left={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) ] } move_right={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) ] } move_forward={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) ] } move_back={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null) ] } jump={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) , Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) ]