Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmaa committed Sep 17, 2023
1 parent ab13a8e commit 005ffb3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 90 deletions.
6 changes: 3 additions & 3 deletions AMSG_Examples/Character/mixamo_character.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ nodes/crouching/node = SubResource("AnimationNodeTransition_rufvy")
nodes/crouching/position = Vector2(-120, 640)
node_connections = [&"output", 0, &"crouch", &"JogFB", 0, &"JogForward", &"JogFB", 1, &"JogBackward", &"Standing", 0, &"Idle", &"Standing", 1, &"WalkFB", &"Standing", 2, &"Run", &"Standing", 3, &"JogFB", &"Standing", 4, &"StopSeek", &"StopSeek", 0, &"StopAnim", &"WalkFB", 0, &"WalkForward", &"WalkFB", 1, &"WalkBackward", &"crouch", 0, &"Standing", &"crouch", 1, &"crouching", &"crouching", 0, &"CrouchIdle", &"crouching", 1, &"CrouchWalkingForward"]

[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_m668p"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_kgjnt"]
resource_local_to_scene = true
nodes/AnimTurnLeft/node = SubResource("AnimationNodeAnimation_mb2kt")
nodes/AnimTurnLeft/position = Vector2(500, 1540)
Expand Down Expand Up @@ -455,7 +455,7 @@ PlayerRef = NodePath("../CharacterMovementComponent")
first_person_camera_bone = NodePath("../Armature/Skeleton3D/BoneAttachment3D")

[node name="AnimationTree" parent="." node_paths=PackedStringArray("movement_script") instance=ExtResource("3_86f8p")]
tree_root = SubResource("AnimationNodeBlendTree_m668p")
tree_root = SubResource("AnimationNodeBlendTree_kgjnt")
anim_player = NodePath("../AnimationPlayer")
active = true
parameters/VelocityDirection/JogFB/current_state = "Forward"
Expand Down Expand Up @@ -962,7 +962,7 @@ mesh = ExtResource("6_e2l25")
skin = SubResource("Skin_hh536")

[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"]
transform = Transform3D(0.997853, -0.0651962, 0.00621694, 0.0582333, 0.839814, -0.539742, 0.029968, 0.538945, 0.841807, -0.017434, 1.49834, 0.112726)
transform = Transform3D(0.997853, -0.0651963, 0.00621715, 0.0582334, 0.839814, -0.539742, 0.0299679, 0.538945, 0.841808, -0.0174341, 1.49834, 0.112726)
bone_name = "Head"
bone_idx = 5

Expand Down
22 changes: 11 additions & 11 deletions AMSG_Examples/Player/Player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -239,24 +239,24 @@ targeting_component = NodePath("../TargetingComponent")
tilt_power = 0.0
deacceleration = 5.0

[node name="PlayerController" type="Node" parent="." index="6" node_paths=PackedStringArray("character_component", "networking", "lock_system")]
[node name="LockSystem" type="Node" parent="." index="6"]
script = ExtResource("11_06pi7")

[node name="PlayerController" type="Node" parent="." index="7" node_paths=PackedStringArray("character_component", "networking", "lock_system")]
script = ExtResource("4_7eusw")
OnePressJump = true
UsingCrouchToggle = true
character_component = NodePath("../CharacterMovementComponent")
networking = NodePath("../Networking")
lock_system = NodePath("LockSystem")

[node name="LockSystem" type="Node" parent="PlayerController" index="0"]
script = ExtResource("11_06pi7")
lock_system = NodePath("../LockSystem")

[node name="Networking" parent="." index="7" instance=ExtResource("4_8jv5v")]
[node name="Networking" parent="." index="8" instance=ExtResource("4_8jv5v")]
character_movement_component = NodePath("../CharacterMovementComponent")

[node name="CameraComponent" parent="." index="8" node_paths=PackedStringArray("networking")]
[node name="CameraComponent" parent="." index="9" node_paths=PackedStringArray("networking")]
networking = NodePath("../Networking")

[node name="AnimationTree" parent="." index="9"]
[node name="AnimationTree" parent="." index="10"]
tree_root = SubResource("AnimationNodeBlendTree_jqd3m")
parameters/VelocityDirection/JogFB/current_state = ""
parameters/VelocityDirection/JogFB/current_index = -1
Expand All @@ -267,7 +267,7 @@ parameters/VelocityDirection/WalkFB/current_index = -1
parameters/VelocityDirection/crouching/current_state = ""
parameters/VelocityDirection/crouching/current_index = -1

[node name="CollisionShape3D" parent="." index="10"]
[node name="CollisionShape3D" parent="." index="11"]
shape = SubResource("CapsuleShape3D_jrjkm")

[node name="Skeleton3D" parent="Armature" index="0"]
Expand Down Expand Up @@ -338,7 +338,7 @@ current = true
[node name="TargetRayCast" type="RayCast3D" parent="SpringArm3D/Camera" index="1"]
target_position = Vector3(0, 0, -10)

[node name="Status" type="Control" parent="." index="15" node_paths=PackedStringArray("camera_root")]
[node name="Status" type="Control" parent="." index="16" node_paths=PackedStringArray("camera_root")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
Expand Down Expand Up @@ -481,4 +481,4 @@ text = "Character locked. Press P to unlock."
horizontal_alignment = 1
vertical_alignment = 1

[connection signal="Lock_Status_Changed" from="PlayerController/LockSystem" to="Status/PauseText" method="set_visible"]
[connection signal="Lock_Status_Changed" from="LockSystem" to="Status/PauseText" method="set_visible"]
93 changes: 17 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,86 +14,27 @@ You may use it in any other camera type like RTS, but you will need to tweak it
## (adding to existing project)
1- copy the files to your Godot project

2- copy and paste the following into your project's "project.godot" file
2- Add the following Input Maps to your project

```
[input]
forward={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
back={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
left={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
jump={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
sprint={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777237,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
aim={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"pressed":false,"double_click":false,"script":null)
]
}
crouch={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777238,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
interaction={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":70,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
switch_camera_view={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":67,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
ragdoll={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":88,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
flashlight={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":76,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
EnableSDFGI={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":71,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
exit={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777217,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
fire={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null)
]
}
forward
back
left
right
jump
sprint
aim
crouch
interaction
switch_camera_view
ragdoll
flashlight
EnableSDFGI
exit
fire
pause
```

3- autoload the "Global.gd" GDscript, you can find it in "res://addons/AMSG/Global.gd"
Expand Down

0 comments on commit 005ffb3

Please sign in to comment.