feat: Rotate arrow to point at station
This commit is contained in:
parent
80f268d536
commit
125cb3fdb0
|
|
@ -3,19 +3,20 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bpfvioqm4kbv8"
|
||||
path="res://.godot/imported/arrow.png-9053f2b1a9a256ad0bb19fe69a4c452c.ctex"
|
||||
path.s3tc="res://.godot/imported/arrow.png-9053f2b1a9a256ad0bb19fe69a4c452c.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Images/arrow.png"
|
||||
dest_files=["res://.godot/imported/arrow.png-9053f2b1a9a256ad0bb19fe69a4c452c.ctex"]
|
||||
dest_files=["res://.godot/imported/arrow.png-9053f2b1a9a256ad0bb19fe69a4c452c.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
|
|
@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
|||
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=""
|
||||
|
|
@ -37,4 +38,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,2 +1,3 @@
|
|||
extends Node
|
||||
var chunk_size: float = 150
|
||||
var station_coords: Vector3 = Vector3.ZERO
|
||||
|
|
|
|||
2
level.gd
2
level.gd
|
|
@ -50,6 +50,8 @@ func initialize_world() -> void:
|
|||
var station = Vector2i(randi() % dimension, 0)
|
||||
var spawn = Vector2i(dimension - station.x - 1, dimension - 1)
|
||||
|
||||
Global.station_coords = Vector3(station.x + Global.chunk_size/2, 0, station.y + Global.chunk_size/2)
|
||||
|
||||
$Player.position.x = spawn.x * Global.chunk_size
|
||||
$Player.position.z = spawn.y * Global.chunk_size
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ fog_sky_affect = 0.39
|
|||
fog_height = 2.3
|
||||
|
||||
[node name="Level" type="Node3D" unique_id=1248504413]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.44119096, 0)
|
||||
script = ExtResource("1_0b4ue")
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=2012504496]
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ func _process(delta: float) -> void:
|
|||
if not is_active:
|
||||
return
|
||||
|
||||
$Arrow.look_at(Global.station_coords)
|
||||
|
||||
$HUD/StaminaRect.scale.x = stamina / max_stamina
|
||||
$HUD/StageLabel.text = "Stage %d" % [stage_counter + 1]
|
||||
|
||||
|
|
|
|||
16
player.tscn
16
player.tscn
|
|
@ -28,7 +28,12 @@ radius = 30.0
|
|||
height = 0.5
|
||||
radius = 50.0
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_hqtel"]
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_sweqy"]
|
||||
size = Vector2(4, 4)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2hs0m"]
|
||||
transparency = 1
|
||||
albedo_texture = ExtResource("4_hqtel")
|
||||
|
||||
[node name="Player" type="CharacterBody3D" unique_id=17046866]
|
||||
collision_layer = 4
|
||||
|
|
@ -297,11 +302,10 @@ debug_color = Color(0.5381443, 0.5430501, 0.4771669, 0.41960785)
|
|||
shape = SubResource("CylinderShape3D_hqtel")
|
||||
debug_color = Color(0.6328197, 0.113640614, 0, 0.41960785)
|
||||
|
||||
[node name="Arrow" type="MeshInstance2D" parent="." unique_id=1435818053]
|
||||
position = Vector2(604, 57)
|
||||
scale = Vector2(69.25001, 66.25001)
|
||||
mesh = SubResource("QuadMesh_hqtel")
|
||||
texture = ExtResource("4_hqtel")
|
||||
[node name="Arrow" type="MeshInstance3D" parent="." unique_id=870899544]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
|
||||
mesh = SubResource("PlaneMesh_sweqy")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_2hs0m")
|
||||
|
||||
[connection signal="timeout" from="TimeLimit" to="." method="_on_time_limit_timeout"]
|
||||
[connection signal="shop_exit" from="Shop" to="." method="_on_shop_shop_exit"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue