Ship mostly works #10
@ -3,25 +3,26 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://fwub8fvl2u4i"
|
||||
path="res://.godot/imported/ps1hagrid.png-c23425fa4ddfd6de7aebcbcf4a03083a.ctex"
|
||||
path.s3tc="res://.godot/imported/ps1hagrid.png-c23425fa4ddfd6de7aebcbcf4a03083a.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/ingameconsole/ps1hagrid.png"
|
||||
dest_files=["res://.godot/imported/ps1hagrid.png-c23425fa4ddfd6de7aebcbcf4a03083a.ctex"]
|
||||
dest_files=["res://.godot/imported/ps1hagrid.png-c23425fa4ddfd6de7aebcbcf4a03083a.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
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=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
detect_3d/compress_to=0
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://c6w0ivy4hetrl"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://c6w0ivy4hetrl"]
|
||||
|
||||
[ext_resource type="Script" path="res://assets/core/player-controller/scripts/player.gd" id="1_bv7t4"]
|
||||
[ext_resource type="Texture2D" uid="uid://fwub8fvl2u4i" path="res://addons/ingameconsole/ps1hagrid.png" id="2_omgn1"]
|
||||
@ -9,22 +9,28 @@
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_v7b3h"]
|
||||
radius = 0.35
|
||||
height = 1.5
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_qlkab"]
|
||||
radius = 0.35
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_vu2l8"]
|
||||
radius = 0.35
|
||||
height = 0.7
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wmxrr"]
|
||||
shader = ExtResource("3_rakxt")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0n7pd"]
|
||||
shader = ExtResource("3_rakxt")
|
||||
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("camera", "neck", "player_avatar_decal")]
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("camera", "neck", "player_avatar_face", "body")]
|
||||
collision_mask = 242
|
||||
script = ExtResource("1_bv7t4")
|
||||
camera = NodePath("Neck/Camera3D")
|
||||
neck = NodePath("Neck")
|
||||
player_avatar_decal = NodePath("Neck/PlayerAvatarDecal")
|
||||
player_avatar_face = NodePath("Neck/PlayerAvatarFace")
|
||||
body = NodePath("Body")
|
||||
|
||||
[node name="PlayerTag" type="Label3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.26654, 0)
|
||||
@ -33,7 +39,8 @@ visibility_range_end = 15.0
|
||||
billboard = 1
|
||||
text = "username"
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
[node name="Body" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
|
||||
mesh = SubResource("CapsuleMesh_v7b3h")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
@ -42,6 +49,9 @@ shape = SubResource("CapsuleShape3D_qlkab")
|
||||
[node name="Neck" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.65, 0)
|
||||
|
||||
[node name="Head" type="MeshInstance3D" parent="Neck"]
|
||||
mesh = SubResource("SphereMesh_vu2l8")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Neck"]
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Neck/Camera3D" node_paths=PackedStringArray("player")]
|
||||
@ -50,12 +60,9 @@ collision_mask = 256
|
||||
script = ExtResource("2_wvu3d")
|
||||
player = NodePath("../../..")
|
||||
|
||||
[node name="PlayerAvatarDecal" type="Decal" parent="Neck"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -0.0323475, -0.316656)
|
||||
size = Vector3(0.45, 0.4, 0.45)
|
||||
texture_albedo = ExtResource("2_omgn1")
|
||||
upper_fade = 0.08
|
||||
lower_fade = 0.08
|
||||
[node name="PlayerAvatarFace" type="Sprite3D" parent="Neck"]
|
||||
transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, -0.349588)
|
||||
texture = ExtResource("2_omgn1")
|
||||
|
||||
[node name="PlayerHUD" type="CanvasLayer" parent="." node_paths=PackedStringArray("fps_label")]
|
||||
script = ExtResource("3_02ne1")
|
||||
|
@ -17,7 +17,8 @@ var steam_id: int = 0
|
||||
@export_range(0.1, 3.0, 0.1, "or_greater") var joystick_camera_sens_multiplier: float = 5.0
|
||||
@export var camera: Camera3D
|
||||
@export var neck: Node3D
|
||||
@export var player_avatar_decal: Decal
|
||||
@export var player_avatar_face: Sprite3D
|
||||
@export var body: MeshInstance3D
|
||||
|
||||
var jumping: bool = false
|
||||
var is_using_joystick: bool = false
|
||||
@ -33,6 +34,7 @@ var current_ship: Ship
|
||||
|
||||
var previous_global_position: Vector3
|
||||
var previous_global_rotation: Vector3
|
||||
var previous_head_vert_rotation: Vector3
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@ -41,10 +43,12 @@ func _ready() -> void:
|
||||
|
||||
player_tag = get_node("PlayerTag")
|
||||
player_tag.text = username
|
||||
player_avatar_decal.texture_albedo = await NetworkManager.get_player_avatar(steam_id)
|
||||
player_avatar_face.texture = await NetworkManager.get_player_avatar(steam_id)
|
||||
|
||||
if is_network_authority:
|
||||
camera.make_current()
|
||||
body.hide()
|
||||
player_avatar_face.hide()
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
@ -93,6 +97,9 @@ func _process(delta: float) -> void:
|
||||
if previous_global_rotation != global_rotation:
|
||||
NetworkManager.sync_property(network_uuid, "global_rotation", global_rotation)
|
||||
previous_global_rotation = global_rotation
|
||||
if previous_head_vert_rotation != neck.global_rotation:
|
||||
NetworkManager.sync_property(network_uuid, "neck.global_rotation", neck.global_rotation)
|
||||
previous_global_rotation = neck.global_rotation
|
||||
|
||||
|
||||
func capture_mouse() -> void:
|
||||
|
Loading…
Reference in New Issue
Block a user