first commit
This commit is contained in:
BIN
characters/samus/samus-texture-128-corrected.png
Executable file
BIN
characters/samus/samus-texture-128-corrected.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
35
characters/samus/samus-texture-128-corrected.png.import
Normal file
35
characters/samus/samus-texture-128-corrected.png.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ge73q5qik686"
|
||||
path.s3tc="res://.godot/imported/samus-texture-128-corrected.png-ff9d6e4a0c1ecde120b84e2b801c0cf2.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://characters/samus/samus-texture-128-corrected.png"
|
||||
dest_files=["res://.godot/imported/samus-texture-128-corrected.png-ff9d6e4a0c1ecde120b84e2b801c0cf2.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
7
characters/samus/samus-texture-mat.tres
Normal file
7
characters/samus/samus-texture-mat.tres
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://dfacvvhew44xp"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ge73q5qik686" path="res://characters/samus/samus-texture-128-corrected.png" id="1_awcuv"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_awcuv")
|
||||
texture_filter = 0
|
||||
524
characters/samus/samus.bin
Normal file
524
characters/samus/samus.bin
Normal file
File diff suppressed because one or more lines are too long
49
characters/samus/samus.gd
Normal file
49
characters/samus/samus.gd
Normal file
@@ -0,0 +1,49 @@
|
||||
extends CharacterBody3D
|
||||
|
||||
@export var state_machine: LimboHSM
|
||||
@onready var idle_state: LimboState = $LimboHSM/Idle
|
||||
|
||||
@export var move_pcam : PhantomCamera3D
|
||||
|
||||
@export var mouse_sensitivity: float = 0.05
|
||||
|
||||
@export var min_pitch: float = -89.9
|
||||
@export var max_pitch: float = 50
|
||||
|
||||
@export var min_yaw: float = 0
|
||||
@export var max_yaw: float = 360
|
||||
|
||||
func _ready() -> void:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
|
||||
_initialize_state_machine()
|
||||
|
||||
|
||||
func _initialize_state_machine() -> void:
|
||||
state_machine.initial_state = idle_state
|
||||
state_machine.initialize(self)
|
||||
state_machine.set_active(true)
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
|
||||
if event is InputEventMouseMotion:
|
||||
|
||||
var pcam_rotation_degrees: Vector3
|
||||
|
||||
# Assigns the current 3D rotation of the SpringArm3D node - so it starts off where it is in the editor
|
||||
pcam_rotation_degrees = move_pcam.get_third_person_rotation_degrees()
|
||||
|
||||
# Change the X rotation
|
||||
pcam_rotation_degrees.x -= event.relative.y * mouse_sensitivity
|
||||
|
||||
# Clamp the rotation in the X axis so it go over or under the target
|
||||
pcam_rotation_degrees.x = clampf(pcam_rotation_degrees.x, min_pitch, max_pitch)
|
||||
|
||||
# Change the Y rotation value
|
||||
pcam_rotation_degrees.y -= event.relative.x * mouse_sensitivity
|
||||
|
||||
# Sets the rotation to fully loop around its target, but witout going below or exceeding 0 and 360 degrees respectively
|
||||
pcam_rotation_degrees.y = wrapf(pcam_rotation_degrees.y, min_yaw, max_yaw)
|
||||
|
||||
# Change the SpringArm3D node's rotation and rotate around its target
|
||||
move_pcam.set_third_person_rotation_degrees(pcam_rotation_degrees)
|
||||
1
characters/samus/samus.gd.uid
Normal file
1
characters/samus/samus.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://byrirmtjstdx6
|
||||
BIN
characters/samus/samus.glb
Normal file
BIN
characters/samus/samus.glb
Normal file
Binary file not shown.
44
characters/samus/samus.glb.import
Normal file
44
characters/samus/samus.glb.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cene38uaq3y64"
|
||||
path="res://.godot/imported/samus.glb-042d9a5e196885bb34364cad04e22af3.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://characters/samus/samus.glb"
|
||||
dest_files=["res://.godot/imported/samus.glb-042d9a5e196885bb34364cad04e22af3.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type="CharacterBody3D"
|
||||
nodes/root_name="Samus"
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/path": "uid://dfacvvhew44xp"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
6456
characters/samus/samus.gltf
Normal file
6456
characters/samus/samus.gltf
Normal file
File diff suppressed because it is too large
Load Diff
37
characters/samus/samus.gltf.import
Normal file
37
characters/samus/samus.gltf.import
Normal file
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://16ya8p8urk4b"
|
||||
path="res://.godot/imported/samus.gltf-5c9da60a8f798efe4d198ea1c6739ad9.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://characters/samus/samus.gltf"
|
||||
dest_files=["res://.godot/imported/samus.gltf-5c9da60a8f798efe4d198ea1c6739ad9.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
132
characters/samus/samus.tscn
Normal file
132
characters/samus/samus.tscn
Normal file
@@ -0,0 +1,132 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://b6cat7mj1lmpb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cene38uaq3y64" path="res://characters/samus/samus.glb" id="1_3tb66"]
|
||||
[ext_resource type="Script" uid="uid://byrirmtjstdx6" path="res://characters/samus/samus.gd" id="2_1vd4e"]
|
||||
[ext_resource type="Script" uid="uid://bd046eokvcnu2" path="res://addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd" id="2_gqrom"]
|
||||
[ext_resource type="Script" uid="uid://csjccrhj5wnx7" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_3d.gd" id="3_3tb1x"]
|
||||
[ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="4_1vd4e"]
|
||||
[ext_resource type="Script" uid="uid://b8hhnqsugykly" path="res://addons/phantom_camera/scripts/resources/camera_3d_resource.gd" id="5_3tb1x"]
|
||||
[ext_resource type="Script" uid="uid://dohyq145fqsdy" path="res://scripts/characters/samus/idle.gd" id="7_6gxik"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_wkxnt"]
|
||||
radius = 0.410222
|
||||
|
||||
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_3u6of"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_gqrom"]
|
||||
animation = &"standing_idle "
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3tb1x"]
|
||||
animation = &"walking "
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_1vd4e"]
|
||||
graph_offset = Vector2(-420.994, -37.8418)
|
||||
nodes/Blend2/node = SubResource("AnimationNodeBlend2_3u6of")
|
||||
nodes/Blend2/position = Vector2(100, 100)
|
||||
nodes/idle/node = SubResource("AnimationNodeAnimation_gqrom")
|
||||
nodes/idle/position = Vector2(-140, 40)
|
||||
nodes/walk/node = SubResource("AnimationNodeAnimation_3tb1x")
|
||||
nodes/walk/position = Vector2(-140, 220)
|
||||
node_connections = [&"Blend2", 0, &"idle", &"Blend2", 1, &"walk", &"output", 0, &"Blend2"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6gxik"]
|
||||
script = ExtResource("4_1vd4e")
|
||||
duration = 1.0
|
||||
transition = 0
|
||||
ease = 2
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1vd4e"]
|
||||
script = ExtResource("5_3tb1x")
|
||||
keep_aspect = 1
|
||||
cull_mask = 1048575
|
||||
h_offset = 0.0
|
||||
v_offset = 0.0
|
||||
projection = 0
|
||||
fov = 75.0
|
||||
size = 1.0
|
||||
frustum_offset = Vector2(0, 0)
|
||||
near = 0.05
|
||||
far = 4000.0
|
||||
metadata/_custom_type_script = "uid://b8hhnqsugykly"
|
||||
|
||||
[node name="Samus" node_paths=PackedStringArray("state_machine", "move_pcam") instance=ExtResource("1_3tb66")]
|
||||
script = ExtResource("2_1vd4e")
|
||||
state_machine = NodePath("LimboHSM")
|
||||
move_pcam = NodePath("PhantomCamera3D")
|
||||
|
||||
[node name="Skeleton3D" parent="Samus_Armature" index="0"]
|
||||
bones/1/position = Vector3(-0.0564104, -0.0819997, -0.275536)
|
||||
bones/1/rotation = Quaternion(0.532204, 0.0352717, -0.0405761, 0.844907)
|
||||
bones/2/position = Vector3(-0.110015, -0.105465, -0.273875)
|
||||
bones/2/rotation = Quaternion(0.212103, 0.00295528, 0.178504, 0.960802)
|
||||
bones/3/position = Vector3(-0.0262212, 0.148077, -6.29464e-08)
|
||||
bones/3/rotation = Quaternion(0.820532, 0.0768203, -0.201506, -0.52936)
|
||||
bones/4/rotation = Quaternion(-0.0813801, 5.54073e-08, 4.85456e-08, 0.996683)
|
||||
bones/5/rotation = Quaternion(0.573798, -0.0253381, -0.00181086, 0.818603)
|
||||
bones/6/rotation = Quaternion(0.217515, -1.84893e-06, -5.86377e-07, 0.976057)
|
||||
bones/7/rotation = Quaternion(-0.198261, -0.0161392, -0.0196166, 0.97982)
|
||||
bones/8/position = Vector3(-0.00514961, -0.108737, -0.284717)
|
||||
bones/8/rotation = Quaternion(0.192436, 0.0892449, -0.229082, 0.950013)
|
||||
bones/9/position = Vector3(0.0262211, 0.148077, -6.624e-08)
|
||||
bones/9/rotation = Quaternion(0.722371, 0.224226, -0.101927, -0.646153)
|
||||
bones/10/rotation = Quaternion(-0.261936, -2.69341e-09, -1.27318e-07, 0.965085)
|
||||
bones/11/rotation = Quaternion(0.60672, 0.00900321, 0.0239919, 0.794502)
|
||||
bones/12/rotation = Quaternion(0.217515, 1.83635e-06, 5.50013e-07, 0.976057)
|
||||
bones/13/rotation = Quaternion(-0.158114, -0.0111925, 0.0230516, 0.987088)
|
||||
bones/14/position = Vector3(-0.0330754, 0.012613, -0.078391)
|
||||
bones/14/rotation = Quaternion(0.693184, -0.00310139, -0.00991227, 0.720686)
|
||||
bones/15/rotation = Quaternion(0.0457954, 0.0051759, 0.0422762, 0.998043)
|
||||
bones/16/rotation = Quaternion(-0.601214, 0.00402665, 0.00826362, 0.799035)
|
||||
bones/17/rotation = Quaternion(0.561584, 0.0233951, -0.028791, 0.826587)
|
||||
bones/19/rotation = Quaternion(-0.0712464, 0.60118, -0.774026, 0.185447)
|
||||
bones/20/rotation = Quaternion(0.62182, 0.00217642, -0.174097, 0.763561)
|
||||
bones/21/rotation = Quaternion(-0.180338, -0.970693, 0.051125, 0.150395)
|
||||
bones/22/rotation = Quaternion(-0.174469, -3.25258e-10, -1.38881e-08, 0.984663)
|
||||
bones/23/rotation = Quaternion(0.237747, 0.78362, 0.498957, -0.28365)
|
||||
bones/24/rotation = Quaternion(0.0187276, -0.538211, 0.833539, 0.123248)
|
||||
bones/25/rotation = Quaternion(0.627716, -0.00232292, 0.20023, 0.752247)
|
||||
bones/26/rotation = Quaternion(0.0594015, 0.0899191, -0.94021, 0.323095)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." index="2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_wkxnt")
|
||||
|
||||
[node name="AnimationTree" type="AnimationTree" parent="." index="3"]
|
||||
tree_root = SubResource("AnimationNodeBlendTree_1vd4e")
|
||||
anim_player = NodePath("../AnimationPlayer")
|
||||
parameters/Blend2/blend_amount = 0.0
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." index="4"]
|
||||
physics_interpolation_mode = 1
|
||||
transform = Transform3D(-1, -4.50261e-08, 7.49359e-08, -1.77636e-15, 0.857167, 0.515038, -8.74228e-08, 0.515038, -0.857167, 2.84382e-07, 3.39957, -3.25295)
|
||||
|
||||
[node name="PhantomCameraHost" type="Node" parent="Camera3D" index="0"]
|
||||
process_priority = 300
|
||||
process_physics_priority = 300
|
||||
script = ExtResource("2_gqrom")
|
||||
|
||||
[node name="PhantomCamera3D" type="Node3D" parent="." index="5" node_paths=PackedStringArray("follow_target")]
|
||||
transform = Transform3D(-1, -4.50261e-08, 7.49359e-08, -1.77636e-15, 0.857167, 0.515038, -8.74228e-08, 0.515038, -0.857167, 2.84382e-07, 3.39957, -3.25295)
|
||||
script = ExtResource("3_3tb1x")
|
||||
follow_mode = 6
|
||||
follow_target = NodePath("..")
|
||||
tween_resource = SubResource("Resource_6gxik")
|
||||
camera_3d_resource = SubResource("Resource_1vd4e")
|
||||
follow_offset = Vector3(0, 1.445, 0)
|
||||
follow_distance = 3.795
|
||||
vertical_rotation_offset = 0.541052
|
||||
horizontal_rotation_offset = 3.14159
|
||||
spring_length = 3.795
|
||||
|
||||
[node name="LimboHSM" type="LimboHSM" parent="." index="6"]
|
||||
|
||||
[node name="Idle" type="LimboState" parent="LimboHSM" index="0" node_paths=PackedStringArray("animation_player")]
|
||||
script = ExtResource("7_6gxik")
|
||||
animation_player = NodePath("../../AnimationPlayer")
|
||||
animation = &"standing_idle"
|
||||
|
||||
[node name="Walk" type="LimboState" parent="LimboHSM" index="1"]
|
||||
|
||||
[node name="Aim" type="LimboState" parent="LimboHSM" index="2"]
|
||||
|
||||
[node name="Shoot" type="LimboState" parent="LimboHSM" index="3"]
|
||||
Reference in New Issue
Block a user