Added Direction arrow to spawn for orienting the player after spawn and made it hide if DEVMODE is false

This commit is contained in:
2024-09-08 19:41:24 -05:00
parent cce9966214
commit 39abcffb48
6 changed files with 50 additions and 5 deletions

View File

@ -1,7 +1,11 @@
[gd_scene load_steps=2 format=3 uid="uid://cpwg1ula5qbrl"]
[gd_scene load_steps=3 format=3 uid="uid://cpwg1ula5qbrl"]
[ext_resource type="Script" path="res://Assets/scripts/SpawnPoint.gd" id="1_1dk7k"]
[ext_resource type="Texture2D" uid="uid://ddwwxd1akyry6" path="res://Assets/textures/Devmode/DEV_Arrow.png" id="2_uc2p6"]
[node name="SpawnPoint" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.72563, 0.394659, -9.82302)
script = ExtResource("1_1dk7k")
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.07401, 0)
texture = ExtResource("2_uc2p6")

View File

@ -3,5 +3,8 @@ extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready():
GlobalSettings.SetSpawnPoint(self.global_position)
GlobalSettings.SetSpawnPoint(self.global_position, self.global_rotation)
GlobalSettings.Se
get_tree().call_group("Player", "respawn")
if not GlobalSettings.DEVMODE:
$Sprite3D.hide()

View File

@ -8,6 +8,7 @@ var is_paused = false
var current_map
var mapLoader
var SpawnPoint:Vector3
var SpawnRotation:Vector3
var Player_Last_Location = Vector3(0,0,0)
var HasVape = false
@ -78,6 +79,7 @@ func PrintSettings():
func SetCurrentMap(selected_map):
current_map = selected_map
func SetSpawnPoint(pos:Vector3):
func SetSpawnPoint(pos:Vector3, rot:Vector3) -> void:
SpawnPoint = pos
print("Spawn Point set to ", pos)
SpawnRotation = rot
print("Spawn Point set to ", pos, rot)

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ddwwxd1akyry6"
path.s3tc="res://.godot/imported/DEV_Arrow.png-dcb395fd1dcf2e7b9cad73edd3a7a28b.s3tc.ctex"
path.etc2="res://.godot/imported/DEV_Arrow.png-dcb395fd1dcf2e7b9cad73edd3a7a28b.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
[deps]
source_file="res://Assets/textures/Devmode/DEV_Arrow.png"
dest_files=["res://.godot/imported/DEV_Arrow.png-dcb395fd1dcf2e7b9cad73edd3a7a28b.s3tc.ctex", "res://.godot/imported/DEV_Arrow.png-dcb395fd1dcf2e7b9cad73edd3a7a28b.etc2.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