3D to 2D
This commit is contained in:
parent
93b7f1c39c
commit
bf55dcac65
5 changed files with 82 additions and 46 deletions
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://b78y8nhrad6ag"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b78y8nhrad6ag"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_ady3x"]
|
||||
[ext_resource type="Shader" path="res://shaders/view.gdshader" id="2_7jxaq"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dejducbp84efs" path="res://models/man/bonecoDeNeve.obj" id="2_8u743"]
|
||||
[ext_resource type="Script" path="res://scripts/PlayerInteraction.gd" id="3_cbjgo"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_kcbxg"]
|
||||
|
||||
|
@ -29,6 +30,26 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8, 0)
|
|||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, -0.216)
|
||||
mesh = SubResource("PlaneMesh_g0wf5")
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Head/Camera3D"]
|
||||
target_position = Vector3(0, 0, -2)
|
||||
script = ExtResource("3_cbjgo")
|
||||
|
||||
[node name="Label" type="Label" parent="Head/Camera3D/RayCast3D"]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -50.0
|
||||
offset_top = -11.5
|
||||
offset_right = 50.0
|
||||
offset_bottom = 11.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(-0.015, 0, -1.31134e-09, 0, 0.015, 0, 1.31134e-09, 0, -0.015, 0, 0.402156, 0.746243)
|
||||
mesh = ExtResource("2_8u743")
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://bd6hvyj4335ye"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/menu/go_in.gd" id="1_fm2vx"]
|
||||
[ext_resource type="Texture2D" uid="uid://dpthky7yki0m2" path="res://models/menu/on_off.png" id="2_hmhtg"]
|
||||
[ext_resource type="Texture2D" uid="uid://0gd2ishr4j5x" path="res://models/menu/on_off.png" id="2_hmhtg"]
|
||||
[ext_resource type="AudioStream" uid="uid://c5fgxh51yhon8" path="res://ressources/sounds/menu/Microsoft Windows 98 Startup Sound .mp3" id="3_ekahx"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ojx4i"]
|
||||
|
|
2
scripts/Desktop.gd
Normal file
2
scripts/Desktop.gd
Normal file
|
@ -0,0 +1,2 @@
|
|||
class_name Interactable
|
||||
extends StaticBody3D
|
11
scripts/PlayerInteraction.gd
Normal file
11
scripts/PlayerInteraction.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends RayCast3D
|
||||
|
||||
@onready var prompt := $Label
|
||||
|
||||
func _physics_process(_delta):
|
||||
prompt.set_text("")
|
||||
if is_colliding():
|
||||
if get_collider() is Interactable:
|
||||
prompt.set_text("Regarder un film sur www3.yggtorrent.qa")
|
||||
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
get_tree().change_scene_to_file("res://Scenes/menu/go_in.tscn")
|
Reference in a new issue