feat: rethought behaviour separation and states
This commit is contained in:
parent
54a887dbf3
commit
c3ff41e1e6
12 changed files with 274 additions and 68 deletions
4
project/data/default_player_character.tres
Normal file
4
project/data/default_player_character.tres
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[gd_resource type="CharacterData" format=3 uid="uid://bmudhddb0vedg"]
|
||||
|
||||
[resource]
|
||||
speed = 1.0
|
||||
|
|
@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.cte
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -25,6 +27,10 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
16
project/objects/player_character.tscn
Normal file
16
project/objects/player_character.tscn
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[gd_scene format=3 uid="uid://dcqd0wo5y5a1g"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vcg8s"]
|
||||
|
||||
[sub_resource type="CylinderMesh" id="CylinderMesh_5kd2n"]
|
||||
|
||||
[node name="PlayerCharacter" type="PlayerCharacter" unique_id=1435471129]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=511026275]
|
||||
shape = SubResource("CapsuleShape3D_vcg8s")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=957221075]
|
||||
mesh = SubResource("CylinderMesh_5kd2n")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." unique_id=932811285]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.90373915, 0.42808357, 0, -0.42808357, 0.90373915, 0, 2.1840205, 3.7269862)
|
||||
|
|
@ -8,8 +8,46 @@
|
|||
|
||||
config_version=5
|
||||
|
||||
[animation]
|
||||
|
||||
compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||
|
||||
[application]
|
||||
|
||||
config/name="authority"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
run/main_scene="uid://cv0ub3llm3jew"
|
||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/size/mode=3
|
||||
|
||||
[input]
|
||||
|
||||
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":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_backward={
|
||||
"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
3d/physics_engine="Jolt Physics"
|
||||
|
|
|
|||
41
project/scenes/test_world.tscn
Normal file
41
project/scenes/test_world.tscn
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[gd_scene format=3 uid="uid://cv0ub3llm3jew"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dcqd0wo5y5a1g" path="res://objects/player_character.tscn" id="1_kyfjp"]
|
||||
[ext_resource type="CharacterData" uid="uid://bmudhddb0vedg" path="res://data/default_player_character.tres" id="2_amxg5"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_kyfjp"]
|
||||
sky_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
|
||||
ground_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_amxg5"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_kyfjp")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_3263u"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_amxg5")
|
||||
tonemap_mode = 2
|
||||
glow_enabled = true
|
||||
|
||||
[node name="TestWorld" type="Node3D" unique_id=262419127]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1185961481]
|
||||
environment = SubResource("Environment_3263u")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1382994887]
|
||||
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="PlayerCharacter" parent="." unique_id=1435471129 instance=ExtResource("1_kyfjp")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
data = ExtResource("2_amxg5")
|
||||
|
||||
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=885387983]
|
||||
use_collision = true
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D" unique_id=1853081325]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
|
||||
size = Vector3(100, 1, 100)
|
||||
|
||||
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D" unique_id=40055740]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.293318, 1.1054688, -6.6544046)
|
||||
size = Vector3(5.5302734, 2.2109375, 3.6298828)
|
||||
Loading…
Add table
Add a link
Reference in a new issue