added the game:)

This commit is contained in:
BrixsBang 2025-09-16 17:23:28 +02:00
parent d4b7c77e09
commit cdfe1089af
58 changed files with 2095 additions and 0 deletions

4
.editorconfig Normal file
View file

@ -0,0 +1,4 @@
root = true
[*]
charset = utf-8

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
/android/

BIN
Immagini/Instant Camera.glb Normal file

Binary file not shown.

View file

@ -0,0 +1,37 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://djswo64leq8be"
path="res://.godot/imported/Instant Camera.glb-d676c6496e8f2fa30a1886c422ab8f14.scn"
[deps]
source_file="res://Immagini/Instant Camera.glb"
dest_files=["res://.godot/imported/Instant Camera.glb-d676c6496e8f2fa30a1886c422ab8f14.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

1
Immagini/icon.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

After

Width:  |  Height:  |  Size: 994 B

37
Immagini/icon.svg.import Normal file
View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cl0v7agi67fbp"
path="res://.godot/imported/icon.svg-6ee88c14468cec77998a5495cdcdb4e8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Immagini/icon.svg"
dest_files=["res://.godot/imported/icon.svg-6ee88c14468cec77998a5495cdcdb4e8.ctex"]
[params]
compress/mode=0
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/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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

BIN
Immagini/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

34
Immagini/image.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://0pl04wrfx36e"
path="res://.godot/imported/image.png-8d623c43e757da6951aebe337a8c0088.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Immagini/image.png"
dest_files=["res://.godot/imported/image.png-8d623c43e757da6951aebe337a8c0088.ctex"]
[params]
compress/mode=0
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/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=1

BIN
Immagini/open book.glb Normal file

Binary file not shown.

View file

@ -0,0 +1,37 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://roh2pkd0qx72"
path="res://.godot/imported/open book.glb-f78a289fb2e101287e54b692e2f3f62f.scn"
[deps]
source_file="res://Immagini/open book.glb"
dest_files=["res://.godot/imported/open book.glb-f78a289fb2e101287e54b692e2f3f62f.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

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dvyv0o1c7ynqq"
path="res://.godot/imported/vector-target-aim-simple-zoom-focus-icon-camera-frame-photo-viewfinder-screen-line-symbol_536875-203(1).png-29476413e0699411187377d79c742911.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Immagini/vector-target-aim-simple-zoom-focus-icon-camera-frame-photo-viewfinder-screen-line-symbol_536875-203(1).png"
dest_files=["res://.godot/imported/vector-target-aim-simple-zoom-focus-icon-camera-frame-photo-viewfinder-screen-line-symbol_536875-203(1).png-29476413e0699411187377d79c742911.ctex"]
[params]
compress/mode=0
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/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=1

182
Scene/base.tscn Normal file
View file

@ -0,0 +1,182 @@
[gd_scene load_steps=18 format=3 uid="uid://g3ocaiur6ojd"]
[ext_resource type="Script" uid="uid://b2chtre60m62g" path="res://Script/base.gd" id="1_iwpok"]
[ext_resource type="PackedScene" uid="uid://mcavsjo6dgd0" path="res://Scene/player.tscn" id="3_x5x41"]
[ext_resource type="PackedScene" uid="uid://bk2nxxt5jfmhw" path="res://visto.tscn" id="4_pntdf"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_g5ejs"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
[sub_resource type="Sky" id="Sky_rpg24"]
sky_material = SubResource("ProceduralSkyMaterial_g5ejs")
[sub_resource type="Environment" id="Environment_3vi8l"]
background_mode = 2
sky = SubResource("Sky_rpg24")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8rhti"]
albedo_color = Color(0.513305, 0.726962, 0.328452, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_g5ejs"]
size = Vector2(20, 20)
[sub_resource type="BoxShape3D" id="BoxShape3D_rpg24"]
size = Vector3(20, 0, 20)
[sub_resource type="PlaneMesh" id="PlaneMesh_ohhpf"]
size = Vector2(40, 40)
[sub_resource type="GDScript" id="GDScript_0ce0i"]
script/source = "extends MeshInstance3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
"
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_8rhti"]
data = PackedVector3Array(20, 0, 20, -20, 0, 20, 20, 0, -20, -20, 0, 20, -20, 0, -20, 20, 0, -20)
[sub_resource type="BoxMesh" id="BoxMesh_3vi8l"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_3vi8l"]
points = PackedVector3Array(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, -0.5)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ohhpf"]
albedo_color = Color(0.958686, 0.172163, 5.77569e-07, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_21bcp"]
albedo_color = Color(0.178295, 0.644373, 0.775982, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tpea4"]
albedo_color = Color(0.725661, 0.571458, 0.0828246, 1)
[node name="Node3D" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0392878, 5.60284e-05, 0.0819645)
script = ExtResource("1_iwpok")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_3vi8l")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.982935, -0.149758, 0.106821, 0, 0.580703, 0.814116, -0.183951, 0.800223, -0.570793, 0, 0, 0)
shadow_enabled = true
[node name="terra" type="MeshInstance3D" parent="."]
transform = Transform3D(1.91805, 0, 0, 0, 1, 0, 0, 0, 1.94726, -0.131999, -0.0807834, 0.0995938)
material_override = SubResource("StandardMaterial3D_8rhti")
mesh = SubResource("PlaneMesh_g5ejs")
metadata/_edit_group_ = true
[node name="StaticBody3D" type="StaticBody3D" parent="terra"]
metadata/_edit_group_ = true
[node name="CollisionShape3D" type="CollisionShape3D" parent="terra/StaticBody3D"]
shape = SubResource("BoxShape3D_rpg24")
metadata/_edit_group_ = true
[node name="death" type="MeshInstance3D" parent="."]
transform = Transform3D(16.3, 0, 0, 0, 1, 0, 0, 0, 12.6, -0.0227752, -9.59846, -0.0194728)
visible = false
mesh = SubResource("PlaneMesh_ohhpf")
script = SubResource("GDScript_0ce0i")
[node name="Area3D" type="Area3D" parent="death"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="death/Area3D"]
shape = SubResource("ConcavePolygonShape3D_8rhti")
[node name="Player" parent="." instance=ExtResource("3_x5x41")]
transform = Transform3D(0.999995, 0.00271548, -0.00172492, -0.00271622, 0.999996, -0.0004321, 0.00172375, 0.000436761, 0.999999, 0, 1, 0)
[node name="Wall" type="MeshInstance3D" parent="."]
transform = Transform3D(39.6553, 0, 0, 0, 5.08344, 0, 0, 0, 1.08613, 0.0282918, 0.14087, 19.0978)
mesh = SubResource("BoxMesh_3vi8l")
[node name="StaticBody3D" type="StaticBody3D" parent="Wall"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="Wall2" type="MeshInstance3D" parent="."]
transform = Transform3D(39.6553, 0, 0, 0, 5.08344, 0, 0, 0, 1.08613, 0.028, 0.141, -19.098)
mesh = SubResource("BoxMesh_3vi8l")
[node name="StaticBody3D" type="StaticBody3D" parent="Wall2"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall2/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="Wall3" type="MeshInstance3D" parent="."]
transform = Transform3D(-1.73339e-06, 0, -1.08613, 0, 5.08344, 0, 39.6553, 0, -4.74763e-08, 19.098, 0.141, 0)
mesh = SubResource("BoxMesh_3vi8l")
[node name="StaticBody3D" type="StaticBody3D" parent="Wall3"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall3/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="Wall4" type="MeshInstance3D" parent="."]
transform = Transform3D(-1.73339e-06, 0, -1.08613, 0, 5.08344, 0, 39.6553, 0, -4.74763e-08, -19.098, 0.141, 0)
mesh = SubResource("BoxMesh_3vi8l")
[node name="StaticBody3D" type="StaticBody3D" parent="Wall4"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Wall4/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="Cubo_red" type="MeshInstance3D" parent="."]
transform = Transform3D(2.9, 0, 0, 0, 1, 0, 0, 0, 3.2, -5.31345, 0.14087, 12.8216)
material_override = SubResource("StandardMaterial3D_ohhpf")
mesh = SubResource("BoxMesh_3vi8l")
[node name="StaticBody3D" type="StaticBody3D" parent="Cubo_red"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cubo_red/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="Cubo_blu2" type="MeshInstance3D" parent="."]
transform = Transform3D(4.05226, 0, 0, 0, 4.47332, 0, 0, 0, 0.617615, 0.154456, 2.06792, -5.93461)
material_override = SubResource("StandardMaterial3D_21bcp")
mesh = SubResource("BoxMesh_3vi8l")
skeleton = NodePath("../Cubo_blu")
[node name="StaticBody3D" type="StaticBody3D" parent="Cubo_blu2"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cubo_blu2/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="Cubo_blu" type="MeshInstance3D" parent="."]
transform = Transform3D(2.9, 0, 0, 0, 1.5876, 0, 0, 0, 3.2, 0.0396042, 0.720582, 12.8395)
material_override = SubResource("StandardMaterial3D_21bcp")
mesh = SubResource("BoxMesh_3vi8l")
[node name="StaticBody3D" type="StaticBody3D" parent="Cubo_blu"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cubo_blu/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="Cubo_yellow" type="MeshInstance3D" parent="."]
transform = Transform3D(2.9, 0, 0, 0, 2.60258, 0, 0, 0, 3.2, 5.26495, 1.22977, 12.8216)
material_override = SubResource("StandardMaterial3D_tpea4")
mesh = SubResource("BoxMesh_3vi8l")
[node name="StaticBody3D" type="StaticBody3D" parent="Cubo_yellow"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cubo_yellow/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_3vi8l")
[node name="focus" parent="." instance=ExtResource("4_pntdf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.693508, 2.90325, 6.09433)
[connection signal="body_entered" from="death/Area3D" to="." method="_on_area_3d_body_entered"]
[connection signal="entrato" from="focus" to="Player" method="_on_visible_entrato"]
[connection signal="uscito" from="focus" to="Player" method="_on_visible_uscito"]

222
Scene/player.tres.gd Normal file
View file

@ -0,0 +1,222 @@
extends CharacterBody3D
const camera_SPEED = 3.5
const Run_SPEED = 7.5
const Walk_SPEED = 5.0
const JUMP_VELOCITY = 4.5
const RAY_LENGTH = 1000
@export var CAMERA_SPEED = 0.01
@onready var camera := $Camera
@onready var player := $"."
@onready var camera3d := $Camera/Camera3D
@onready var target = $Control/target
@onready var CTR = $Shader/ColorRect
@onready var ray = $RayCast3D
@onready var img1 = $"Camera/open book/img1"
@onready var img2 = $"Camera/open book/img2"
@onready var img3 = $"Camera/open book/img3"
@onready var img4 = $"Camera/open book/img4"
@onready var img5 = $"Camera/open book/img5"
@onready var img6 = $"Camera/open book/img6"
var is_going = false
var num = 0
var img_num
var thread := Thread.new()
const freq = 2.0
const amp = 0.08
var t = 0.0
var cam_walk = false
var not_book = true
var visto = false
func _ready():
#CTR.transform.x = get_viewport().size.x
#CTR.transform.y = get_viewport().size.y
target.position.x = get_viewport().size.x / 2 - 626.0 / 2
target.position.y = get_viewport().size.y / 2 - 470.0 / 2
# se vede un qualsiasi input
func _unhandled_input(event: InputEvent) -> void:
# cattura il mouse in modo che non si vede
if event is InputEventMouseButton:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
# mostra di nuovo il mouse
elif event.is_action_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
if event is InputEventMouseMotion:
camera.rotate_y(-event.relative.x * CAMERA_SPEED)
camera3d.rotate_x(-event.relative.y * CAMERA_SPEED)
camera3d.rotation.x = clamp(camera3d.rotation.x, deg_to_rad(-50), deg_to_rad(60))
# prepara la fotocamera con la animazione
if event.is_action_pressed("fotocamera") and not_book:
is_going = true
$AnimPlayer.play('camera_anim')
cam_walk = true
# fa tornare indietro la fotocamera
if event.is_action_released("fotocamera") and not_book:
$AnimPlayer.play_backwards('camera_anim')
is_going = false
cam_walk = false
# fa la foto
if event.is_action_pressed('screenshot') and is_going and not_book:
$Control/target.set_visible(false)#ui che voglio togliere
if $AnimPlayer.is_playing() == false:
await get_tree().process_frame
await get_tree().process_frame
print('target'+str($Control/target.is_visible()))
#$Shader/CTR.set_visible(false)
take_screenshot()
$AnimPlayer2.play('scatto')
$Control/target.set_visible(true)
print('ciao')
# apre il libro
if Input.is_action_just_pressed('book'):
if not_book:
$AnimPlayer3.play('look_book')
not_book = false
else:
$AnimPlayer3.play_backwards("look_book")
not_book = true
#questo serve per fare la foto
func take_screenshot() -> void:
$Control/target.set_visible(false)
# prende lo screenshot di quello che si vede come texure credo...
var img = get_viewport().get_texture().get_image()
var img_num = str(num)
if visto:
num += 1
var file_path = "res://screenshot/image" + img_num + ".png"
print(num)
var img_copy := img.duplicate()
# usa un thread per salvare la foto senza laggare
var thread := Thread.new()
# non so che cazzo e callable me la detto chatgbt:)
var callable := func(): _save_image(img_copy, "res://screenshot/image" + img_num + ".png")
thread.start(callable)
print('img')
func _save_image(img: Image, path: String) -> void:
if visto and num<=6:
img.save_png(path)
# per far vedere nel libro
var image = Image.load_from_file(path)
var texture = ImageTexture.create_from_image(image)
if num == 1:
img1.texture = texture
elif num == 2:
img2.texture = texture
elif num == 3:
img3.texture = texture
elif num == 4:
img4.texture = texture
elif num == 5:
img5.texture = texture
elif num == 6:
img6.texture = texture
#apply_texture($"Camera/open book/Img1", path)
print('save')
#func apply_texture(mesh_instance_node, texture_path):
#var texture = ImageTexture.new()
#var image = Image.new()
#image.load(texture_path)
#texture.create_from_image(image)
#if mesh_instance_node.material_override:
#mesh_instance_node.material_override.albedo_texture = texture
func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var input_dir := Input.get_vector("left", "right", "up", "down")
var direction = (camera.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if Input.is_action_pressed("RUN") and is_on_floor() and cam_walk == false:
if direction:
velocity.x = direction.x * Run_SPEED
velocity.z = direction.z * Run_SPEED
else:
velocity.x = move_toward(velocity.x, 0, Run_SPEED)
velocity.z = move_toward(velocity.z, 0, Run_SPEED)
elif Input.is_action_pressed("fotocamera"):
if direction:
velocity.x = direction.x * camera_SPEED
velocity.z = direction.z * camera_SPEED
else:
velocity.x = move_toward(velocity.x, 0, camera_SPEED)
velocity.z = move_toward(velocity.z, 0, camera_SPEED)
else:
if direction:
velocity.x = direction.x * Walk_SPEED
velocity.z = direction.z * Walk_SPEED
else:
velocity.x = move_toward(velocity.x, 0, Walk_SPEED)
velocity.z = move_toward(velocity.z, 0, Walk_SPEED)
t += delta * velocity.length() * float(is_on_floor())
camera.transform.origin = _headbob(t)
move_and_slide()
func _headbob(time) -> Vector3:
var pos = Vector3.ZERO
pos.y = sin(time * freq) * amp+ 1.626
pos.x = cos(time * freq / 2) * amp
return pos
func _on_timer_timeout() -> void:
if not ray.is_colliding():
visto = true
print('visto')
else:
visto=false
print('non visto')
#func _on_anim_player_animation_finished(look_book) -> void:
# not_book = true
# print('finito')
# controlla se il gruppo ORB (non mi ricordo come si chiama lol) visibile
func _on_visible_entrato() -> void:
var focus = get_tree().get_nodes_in_group("punti focus")
var nearest_spawn_point = focus[0]
for focu in focus:
if focu.global_position.distance_to(player.global_position) < nearest_spawn_point.global_position.distance_to(player.global_position):
nearest_spawn_point = focu
# usa ray per capire se e visibile (potrebbe essere un problema se ci sono tanti ORB)
ray.set_target_position(nearest_spawn_point.position)
$Timer.start()
if not ray.is_colliding():
visto = true
print('visto')
else: visto=false
func _on_visible_uscito() -> void:
visto = false
$Timer.stop()
print('non visto')

1
Scene/player.tres.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://cfekp6e2bhs4s

576
Scene/player.tscn Normal file
View file

@ -0,0 +1,576 @@
[gd_scene load_steps=20 format=3 uid="uid://mcavsjo6dgd0"]
[ext_resource type="PackedScene" uid="uid://djswo64leq8be" path="res://Immagini/Instant Camera.glb" id="1_4flbx"]
[ext_resource type="PackedScene" uid="uid://roh2pkd0qx72" path="res://Immagini/open book.glb" id="1_58ae2"]
[ext_resource type="Script" uid="uid://cfekp6e2bhs4s" path="res://Scene/player.tres.gd" id="1_ivevv"]
[ext_resource type="Texture2D" uid="uid://dvyv0o1c7ynqq" path="res://Immagini/vector-target-aim-simple-zoom-focus-icon-camera-frame-photo-viewfinder-screen-line-symbol_536875-203(1).png" id="2_onrkg"]
[ext_resource type="Shader" uid="uid://xp6bfrjh0pdg" path="res://ctr.gdshader" id="3_xa75v"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_hqtel"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_sweqy"]
points = PackedVector3Array(-0.125207, -0.532801, -0.480507, 0.0227831, 0.47607, 0.498884, 0.169713, 0.559144, 0.464172, 0.231051, -0.803591, 0.320455, 0.40741, 0.651043, -0.243523, -0.482789, 0.594843, 0.0822132, -0.362868, -0.682312, 0.289697, 0.469044, -0.654529, -0.0662713, -0.127444, 0.842701, -0.338103, -0.393435, -0.683942, -0.244717, 0.438255, 0.623309, 0.200849, 0.0841477, 0.977454, 0.114795, -0.0682023, -0.976458, -0.12927, 0.20055, -0.563129, -0.451454, -0.185527, 0.595453, -0.453475, -0.273363, 0.592268, 0.407754, -0.00693649, -0.476823, 0.49966, 0.375821, -0.588614, 0.316955, 0.111579, 0.563059, -0.481177, -0.41725, 0.527866, -0.270497, -0.484546, -0.596972, -0.0665097, -0.279747, 0.908561, 0.0533361, -0.250197, -0.880712, 0.205319, 0.263647, -0.902771, -0.127394, 0.293368, 0.871526, -0.157196, 0.373412, -0.526319, -0.328246, 0.499663, 0.476641, -0.00688856, 0.0531056, 0.875001, 0.324703, -0.154543, -0.590854, 0.465879, -0.0972799, -0.782358, -0.398188, -0.387649, -0.498171, 0.31565, -0.30068, -0.587995, -0.388901)
[sub_resource type="Animation" id="Animation_i3pqv"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera/Camera3D/Inst_Camera:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.186449, -0.09266, -0.183164)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera/Camera3D/Inst_Camera:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.5, 0.5, 0.5)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = false
tracks/2/path = NodePath("Control/target:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Camera/Camera3D/Inst_Camera:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Control/Panel:size")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(1153, 1)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Control/Panel2:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Control/Panel2:modulate")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = false
tracks/7/path = NodePath("Shader/CTR:visible")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("Camera/Camera3D:position")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("Camera/Camera3D:fov")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [75.0]
}
tracks/10/type = "value"
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/path = NodePath("Camera/open book:visible")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/11/type = "value"
tracks/11/imported = false
tracks/11/enabled = true
tracks/11/path = NodePath("Camera/open book:position")
tracks/11/interp = 1
tracks/11/loop_wrap = true
tracks/11/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, -0.203552, -0.042686)]
}
[sub_resource type="Animation" id="Animation_onrkg"]
resource_name = "camera_anim"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera/Camera3D/Inst_Camera:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.266667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0.186449, -0.09266, -0.183164), Vector3(0.070624, -0.0681669, -0.20404)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera/Camera3D/Inst_Camera:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.266667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0.5, 0.5, 0.5), Vector3(1.12301, 1.12301, 1.12301)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Control/target:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.266667, 0.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, false, true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Camera/Camera3D/Inst_Camera:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.3, 0.333333),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [true, true, false]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Control/Panel:size")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.133333, 0.333333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(1153, 1), Vector2(1153, 700), Vector2(1153, 1)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Shader/CTR:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 0.3, 0.333333),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, false, false]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Camera/Camera3D:position")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0.3, 0.333333),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, 0)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Camera/Camera3D:fov")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0.3, 0.333333),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [75.0, 42.9]
}
[sub_resource type="Animation" id="Animation_ivevv"]
resource_name = "look_book"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera/open book:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.266667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera/Camera3D/Inst_Camera:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.133333),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0.186449, -0.09266, -0.183164), Vector3(0.200339, -0.238117, -0.184654)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Camera/Camera3D/Inst_Camera:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.166667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Camera/open book:position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.4),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, -0.203552, -0.042686), Vector3(0, -0.11669, -0.042686)]
}
[sub_resource type="Animation" id="Animation_sweqy"]
resource_name = "ritorno_scatto"
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Control/target:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_hqtel"]
resource_name = "scatto"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Control/Panel2:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0333333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, true, false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = false
tracks/1/path = NodePath("Control/target:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.0333333),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Control/Panel2:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Shader/CTR:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_hqtel"]
_data = {
&"RESET": SubResource("Animation_i3pqv"),
&"camera_anim": SubResource("Animation_onrkg"),
&"look_book": SubResource("Animation_ivevv"),
&"ritorno_scatto": SubResource("Animation_sweqy"),
&"scatto": SubResource("Animation_hqtel")
}
[sub_resource type="Animation" id="Animation_r6jsd"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera/Camera3D/Inst_Camera:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.186449, -0.09266, -0.183164)]
}
[sub_resource type="Animation" id="Animation_58ae2"]
resource_name = "mov_cam"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera/Camera3D/Inst_Camera:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.266667, 0.533333, 0.766667, 1),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 0,
"values": [Vector3(0.186449, -0.09266, -0.183164), Vector3(0.186449, -0.128884, -0.183164), Vector3(0.186449, -0.0967208, -0.183164), Vector3(0.186449, -0.069582, -0.183164), Vector3(0.186, -0.093, -0.183)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_p6qlh"]
_data = {
&"RESET": SubResource("Animation_r6jsd"),
&"mov_cam": SubResource("Animation_58ae2")
}
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_onrkg"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_i3pqv"]
bg_color = Color(0.851769, 0.851769, 0.851769, 1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_58ae2"]
shader = ExtResource("3_xa75v")
shader_parameter/overlay = false
shader_parameter/scanlines_opacity = 0.0
shader_parameter/scanlines_width = 0.0
shader_parameter/grille_opacity = 0.0
shader_parameter/resolution = Vector2(640, 480)
shader_parameter/pixelate = false
shader_parameter/roll = false
shader_parameter/roll_speed = 8.0
shader_parameter/roll_size = 0.0
shader_parameter/roll_variation = 0.1
shader_parameter/distort_intensity = 0.0
shader_parameter/noise_opacity = 0.0
shader_parameter/noise_speed = 5.0
shader_parameter/static_noise_intensity = 0.0
shader_parameter/aberration = 4.75e-08
shader_parameter/brightness = 1.0
shader_parameter/discolor = false
shader_parameter/warp_amount = 0.213
shader_parameter/clip_warp = false
shader_parameter/vignette_intensity = 0.4
shader_parameter/vignette_opacity = 0.5
[node name="Player" type="CharacterBody3D"]
script = ExtResource("1_ivevv")
CAMERA_SPEED = 0.005
[node name="Camera" type="Node3D" parent="."]
transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 1.62624, 0)
[node name="open book" parent="Camera" instance=ExtResource("1_58ae2")]
transform = Transform3D(0.371027, 0, 0, 0, 0.341024, -0.146163, 0, 0.146163, 0.341024, 0, -0.203552, -0.042686)
visible = false
[node name="img1" type="Sprite3D" parent="Camera/open book"]
transform = Transform3D(0.0119495, 0.000129282, 0.336397, -0.00426941, 5.12341e-05, 0.941694, 0.000101255, -0.0130968, 0.00700449, -0.227564, 0.0793058, -0.288889)
[node name="img2" type="Sprite3D" parent="Camera/open book"]
transform = Transform3D(0.0119992, 0.000128513, 0.325233, -0.00412771, 4.66553e-05, 0.945611, 0.000103038, -0.0130968, 0.00655988, -0.0875454, 0.0278816, -0.153726)
[node name="img3" type="Sprite3D" parent="Camera/open book"]
transform = Transform3D(0.012047, 0.000111151, 0.314125, -0.00398627, -6.11278e-06, 0.949379, 0.0001041, -0.0130971, 0.00222279, -0.193001, 0.0664354, -0.0148353)
[node name="img4" type="Sprite3D" parent="Camera/open book"]
transform = Transform3D(0.0125085, 0.000129282, -0.168094, 0.00213269, 5.12341e-05, 0.985769, 0.000131818, -0.0130968, 0.00219696, 0.189233, 0.0296399, -0.281508)
[node name="img5" type="Sprite3D" parent="Camera/open book"]
transform = Transform3D(0.0124497, 0.000128513, -0.193324, 0.00245291, 4.66551e-05, 0.981133, 0.000130901, -0.0130968, 0.00159809, 0.107934, 0.0162589, -0.148389)
[node name="img6" type="Sprite3D" parent="Camera/open book"]
transform = Transform3D(0.0124172, 0.000111151, -0.20598, 0.00261399, -6.11278e-06, 0.978554, 0.000104161, -0.0130971, -0.00220482, 0.206262, 0.0372861, -0.00797266)
[node name="Camera3D" type="Camera3D" parent="Camera"]
near = 0.01
far = 60.95
[node name="Inst_Camera" parent="Camera/Camera3D" instance=ExtResource("1_4flbx")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0.186449, -0.09266, -0.183164)
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, 0)
mesh = SubResource("CapsuleMesh_hqtel")
skeleton = NodePath("")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
transform = Transform3D(1, -0.000352252, 0.000484425, 0.000352169, 1, 0.000189906, -0.000484485, -0.000189752, 1, 0, 1.1, 0)
shape = SubResource("ConvexPolygonShape3D_sweqy")
[node name="AnimPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_hqtel")
}
[node name="AnimPlayer2" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_hqtel")
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_p6qlh")
}
[node name="AnimPlayer3" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_hqtel")
}
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="target" type="TextureRect" parent="Control"]
visible = false
light_mask = 2
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
mouse_filter = 2
texture = ExtResource("2_onrkg")
[node name="Panel" type="Panel" parent="Control"]
modulate = Color(0, 0, 0, 1)
self_modulate = Color(0, 0, 0, 1)
layout_mode = 0
offset_top = -1.0
offset_right = 1153.0
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_onrkg")
[node name="Panel2" type="Panel" parent="Control"]
visible = false
layout_mode = 0
offset_right = 1152.0
offset_bottom = 648.0
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_i3pqv")
[node name="img1" type="TextureRect" parent="Control"]
layout_mode = 0
offset_right = 331.0
offset_bottom = 248.0
[node name="Shader" type="CanvasLayer" parent="."]
[node name="CTR" type="ColorRect" parent="Shader"]
visible = false
material = SubResource("ShaderMaterial_58ae2")
offset_right = 1152.0
offset_bottom = 648.0
mouse_filter = 2
mouse_force_pass_scroll_events = false
[node name="Timer" type="Timer" parent="."]
[node name="RayCast3D" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.34056, 0)
[connection signal="animation_finished" from="AnimPlayer" to="." method="_on_anim_player_animation_finished"]
[connection signal="animation_finished" from="AnimPlayer3" to="." method="_on_anim_player_animation_finished"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

62
Script/Player.gd Normal file
View file

@ -0,0 +1,62 @@
extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 4.5
@export var CAMERA_SPEED = 0.01
@onready var camera := $Camera
@onready var camera3d := $Camera/Camera3D
var is_going= false
var num = 0
var img_num
# se vede un qualsiasi input
func _unhandled_input(event: InputEvent) -> void:
if event is InputEventMouseButton:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
elif event.is_action_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
if event is InputEventMouseMotion:
camera.rotate_y(-event.relative.x * CAMERA_SPEED)
camera3d.rotate_x(-event.relative.y * CAMERA_SPEED)
camera3d.rotation.x = clamp(camera3d.rotation.x, deg_to_rad(-50), deg_to_rad(60))
func _input(event: InputEvent) -> void:
if event.is_action_pressed("fotocamera"):
is_going = true
if event.is_action_released("fotocamera"):
is_going= false
if event.is_action_pressed('screenshot') and is_going:
take_screenshot()
num+=1
print(num)
func take_screenshot() -> void:
img_num = str(num)
get_viewport().get_texture().get_image().save_png('screenshot/image'+img_num+'.png')
num+=1
print(num)
func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var input_dir := Input.get_vector("left", "right", "up", "down")
var direction = (camera.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if direction:
velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
velocity.z = move_toward(velocity.z, 0, SPEED)
move_and_slide()

1
Script/Player.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://ck0nadc2hhggu

8
Script/base.gd Normal file
View file

@ -0,0 +1,8 @@
extends Node
var teleport_target_location = Vector2(100,100)
# PER LA MORTE
func _on_area_3d_body_entered(body: Node3D) -> void:
print("death")
$Player.global_position = Vector3(0.0, 10.0,0.0)

1
Script/base.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://b2chtre60m62g

20
ball.gd Normal file
View file

@ -0,0 +1,20 @@
extends StaticBody3D
signal entrato
signal uscito
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
# se e "visibile nello schermo" emit ma emit anche se ce un muro davanti
func _on_visible_on_screen_notifier_3d_screen_entered() -> void:
entrato.emit()
func _on_visible_on_screen_notifier_3d_screen_exited() -> void:
uscito.emit()

1
ball.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://br3i356g3fo3f

230
ctr.gdshader Normal file
View file

@ -0,0 +1,230 @@
/*
Shader from Godot Shaders - the free shader library.
godotshaders.com/shader/VHS-and-CRT-monitor-effect
This shader is under CC0 license. Feel free to use, improve and
change this shader according to your needs and consider sharing
the modified result to godotshaders.com.
*/
shader_type canvas_item;
//*** IMPORTANT! ***/
// - If you are using this shader to affect the node it is applied to set 'overlay' to false (unchecked in the instepctor).
// - If you are using this shader as an overlay, and want the shader to affect the nodes below in the Scene hierarchy,
// set 'overlay' to true (checked in the inspector).
// On Mac there is potentially a bug causing this to not work properly. If that is the case and you want to use the shader as an overlay
// change all "overlay ? SCREEN_TEXTURE : TEXTURE" to only "SCREEN_TEXTURE" on lines 129-140, and "vec2 uv = overlay ? warp(SCREEN_UV) : warp(UV);"
// to "vec2 uv = warp(SCREEN_UV);" on line 98.
uniform bool overlay = false;
uniform float scanlines_opacity : hint_range(0.0, 1.0) = 0.4;
uniform float scanlines_width : hint_range(0.0, 0.5) = 0.25;
uniform float grille_opacity : hint_range(0.0, 1.0) = 0.3;
uniform vec2 resolution = vec2(640.0, 480.0); // Set the number of rows and columns the texture will be divided in. Scanlines and grille will make a square based on these values
uniform bool pixelate = true; // Fill each square ("pixel") with a sampled color, creating a pixel look and a more accurate representation of how a CRT monitor would work.
uniform bool roll = true;
uniform float roll_speed = 8.0; // Positive values are down, negative are up
uniform float roll_size : hint_range(0.0, 100.0) = 15.0;
uniform float roll_variation : hint_range(0.1, 5.0) = 1.8; // This valie is not an exact science. You have to play around with the value to find a look you like. How this works is explained in the code below.
uniform float distort_intensity : hint_range(0.0, 0.2) = 0.05; // The distortion created by the rolling effect.
uniform float noise_opacity : hint_range(0.0, 1.0) = 0.4;
uniform float noise_speed = 5.0; // There is a movement in the noise pattern that can be hard to see first. This sets the speed of that movement.
uniform float static_noise_intensity : hint_range(0.0, 1.0) = 0.06;
uniform float aberration : hint_range(-1.0, 1.0) = 0.03; // Chromatic aberration, a distortion on each color channel.
uniform float brightness = 1.4; // When adding scanline gaps and grille the image can get very dark. Brightness tries to compensate for that.
uniform bool discolor = true; // Add a discolor effect simulating a VHS
uniform float warp_amount :hint_range(0.0, 5.0) = 1.0; // Warp the texture edges simulating the curved glass of a CRT monitor or old TV.
uniform bool clip_warp = false;
uniform float vignette_intensity = 0.4; // Size of the vignette, how far towards the middle it should go.
uniform float vignette_opacity : hint_range(0.0, 1.0) = 0.5;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture,filter_linear_mipmap;
// Used by the noise functin to generate a pseudo random value between 0.0 and 1.0
vec2 random(vec2 uv){
uv = vec2( dot(uv, vec2(127.1,311.7) ),
dot(uv, vec2(269.5,183.3) ) );
return -1.0 + 2.0 * fract(sin(uv) * 43758.5453123);
}
// Generate a Perlin noise used by the distortion effects
float noise(vec2 uv) {
vec2 uv_index = floor(uv);
vec2 uv_fract = fract(uv);
vec2 blur = smoothstep(0.0, 1.0, uv_fract);
return mix( mix( dot( random(uv_index + vec2(0.0,0.0) ), uv_fract - vec2(0.0,0.0) ),
dot( random(uv_index + vec2(1.0,0.0) ), uv_fract - vec2(1.0,0.0) ), blur.x),
mix( dot( random(uv_index + vec2(0.0,1.0) ), uv_fract - vec2(0.0,1.0) ),
dot( random(uv_index + vec2(1.0,1.0) ), uv_fract - vec2(1.0,1.0) ), blur.x), blur.y) * 0.5 + 0.5;
}
// Takes in the UV and warps the edges, creating the spherized effect
vec2 warp(vec2 uv){
vec2 delta = uv - 0.5;
float delta2 = dot(delta.xy, delta.xy);
float delta4 = delta2 * delta2;
float delta_offset = delta4 * warp_amount;
return uv + delta * delta_offset;
}
// Adds a black border to hide stretched pixel created by the warp effect
float border (vec2 uv){
float radius = min(warp_amount, 0.08);
radius = max(min(min(abs(radius * 2.0), abs(1.0)), abs(1.0)), 1e-5);
vec2 abs_uv = abs(uv * 2.0 - 1.0) - vec2(1.0, 1.0) + radius;
float dist = length(max(vec2(0.0), abs_uv)) / radius;
float square = smoothstep(0.96, 1.0, dist);
return clamp(1.0 - square, 0.0, 1.0);
}
// Adds a vignette shadow to the edges of the image
float vignette(vec2 uv){
uv *= 1.0 - uv.xy;
float vignette = uv.x * uv.y * 15.0;
return pow(vignette, vignette_intensity * vignette_opacity);
}
void fragment()
{
vec2 uv = overlay ? warp(SCREEN_UV) : warp(UV); // Warp the uv. uv will be used in most cases instead of UV to keep the warping
vec2 text_uv = uv;
vec2 roll_uv = vec2(0.0);
float time = roll ? TIME : 0.0;
// Pixelate the texture based on the given resolution.
if (pixelate)
{
text_uv = ceil(uv * resolution) / resolution;
}
// Create the rolling effect. We need roll_line a bit later to make the noise effect.
// That is why this runs if roll is true OR noise_opacity is over 0.
float roll_line = 0.0;
if (roll || noise_opacity > 0.0)
{
// Create the areas/lines where the texture will be distorted.
roll_line = smoothstep(0.3, 0.9, sin(uv.y * roll_size - (time * roll_speed) ) );
// Create more lines of a different size and apply to the first set of lines. This creates a bit of variation.
roll_line *= roll_line * smoothstep(0.3, 0.9, sin(uv.y * roll_size * roll_variation - (time * roll_speed * roll_variation) ) );
// Distort the UV where where the lines are
roll_uv = vec2(( roll_line * distort_intensity * (1.-UV.x)), 0.0);
}
vec4 text;
if (roll)
{
// If roll is true distort the texture with roll_uv. The texture is split up into RGB to
// make some chromatic aberration. We apply the aberration to the red and green channels accorging to the aberration parameter
// and intensify it a bit in the roll distortion.
text.r = texture(SCREEN_TEXTURE, text_uv + roll_uv * 0.8 + vec2(aberration, 0.0) * .1).r;
text.g = texture(SCREEN_TEXTURE, text_uv + roll_uv * 1.2 - vec2(aberration, 0.0) * .1 ).g;
text.b = texture(SCREEN_TEXTURE, text_uv + roll_uv).b;
text.a = 1.0;
}
else
{
// If roll is false only apply the aberration without any distorion. The aberration values are very small so the .1 is only
// to make the slider in the Inspector less sensitive.
text.r = texture(SCREEN_TEXTURE, text_uv + vec2(aberration, 0.0) * .1).r;
text.g = texture(SCREEN_TEXTURE, text_uv - vec2(aberration, 0.0) * .1).g;
text.b = texture(SCREEN_TEXTURE, text_uv).b;
text.a = 1.0;
}
float r = text.r;
float g = text.g;
float b = text.b;
uv = warp(UV);
// CRT monitors don't have pixels but groups of red, green and blue dots or lines, called grille. We isolate the texture's color channels
// and divide it up in 3 offsetted lines to show the red, green and blue colors next to each other, with a small black gap between.
if (grille_opacity > 0.0){
float g_r = smoothstep(0.85, 0.95, abs(sin(uv.x * (resolution.x * 3.14159265))));
r = mix(r, r * g_r, grille_opacity);
float g_g = smoothstep(0.85, 0.95, abs(sin(1.05 + uv.x * (resolution.x * 3.14159265))));
g = mix(g, g * g_g, grille_opacity);
float b_b = smoothstep(0.85, 0.95, abs(sin(2.1 + uv.x * (resolution.x * 3.14159265))));
b = mix(b, b * b_b, grille_opacity);
}
// Apply the grille to the texture's color channels and apply Brightness. Since the grille and the scanlines (below) make the image very dark you
// can compensate by increasing the brightness.
text.r = clamp(r * brightness, 0.0, 1.0);
text.g = clamp(g * brightness, 0.0, 1.0);
text.b = clamp(b * brightness, 0.0, 1.0);
// Scanlines are the horizontal lines that make up the image on a CRT monitor.
// Here we are actual setting the black gap between each line, which I guess is not the right definition of the word, but you get the idea
float scanlines = 0.5;
if (scanlines_opacity > 0.0)
{
// Same technique as above, create lines with sine and applying it to the texture. Smoothstep to allow setting the line size.
scanlines = smoothstep(scanlines_width, scanlines_width + 0.5, abs(sin(uv.y * (resolution.y * 3.14159265))));
text.rgb = mix(text.rgb, text.rgb * vec3(scanlines), scanlines_opacity);
}
// Apply the banded noise.
if (noise_opacity > 0.0)
{
// Generate a noise pattern that is very stretched horizontally, and animate it with noise_speed
float noise = smoothstep(0.4, 0.5, noise(uv * vec2(2.0, 200.0) + vec2(10.0, (TIME * (noise_speed))) ) );
// We use roll_line (set above) to define how big the noise should be vertically (multiplying cuts off all black parts).
// We also add in some basic noise with random() to break up the noise pattern above. The noise is sized according to
// the resolution value set in the inspector. If you don't like this look you can
// change "ceil(uv * resolution) / resolution" to only "uv" to make it less pixelated. Or multiply resolution with som value
// greater than 1.0 to make them smaller.
roll_line *= noise * scanlines * clamp(random((ceil(uv * resolution) / resolution) + vec2(TIME * 0.8, 0.0)).x + 0.8, 0.0, 1.0);
// Add it to the texture based on noise_opacity
text.rgb = clamp(mix(text.rgb, text.rgb + roll_line, noise_opacity), vec3(0.0), vec3(1.0));
}
// Apply static noise by generating it over the whole screen in the same way as above
if (static_noise_intensity > 0.0)
{
text.rgb += clamp(random((ceil(uv * resolution) / resolution) + fract(TIME)).x, 0.0, 1.0) * static_noise_intensity;
}
// Apply a black border to hide imperfections caused by the warping.
// Also apply the vignette
text.rgb *= border(uv);
text.rgb *= vignette(uv);
// Hides the black border and make that area transparent. Good if you want to add the the texture on top an image of a TV or monitor.
if (clip_warp)
{
text.a = border(uv);
}
// Apply discoloration to get a VHS look (lower saturation and higher contrast)
// You can play with the values below or expose them in the Inspector.
float saturation = 0.5;
float contrast = 1.2;
if (discolor)
{
// Saturation
vec3 greyscale = vec3(text.r + text.g + text.b) / 3.;
text.rgb = mix(text.rgb, greyscale, saturation);
// Contrast
float midpoint = pow(0.5, 2.2);
text.rgb = (text.rgb - vec3(midpoint)) * contrast + midpoint;
}
COLOR = text;
}

1
ctr.gdshader.uid Normal file
View file

@ -0,0 +1 @@
uid://xp6bfrjh0pdg

5
open_book.tscn Normal file
View file

@ -0,0 +1,5 @@
[gd_scene load_steps=2 format=3 uid="uid://b3divkll7y164"]
[ext_resource type="PackedScene" uid="uid://roh2pkd0qx72" path="res://Immagini/open book.glb" id="1_uumnn"]
[node name="open book" instance=ExtResource("1_uumnn")]

63
project.godot Normal file
View file

@ -0,0 +1,63 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="GIOCO DI PROVA"
run/main_scene="uid://g3ocaiur6ojd"
config/features=PackedStringArray("4.4", "Forward Plus")
config/icon="res://Immagini/icon.svg"
[global_group]
"punti focus"="per essere visto dal raycast 3d"
[input]
left={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
]
}
right={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
]
}
up={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
]
}
down={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
]
}
screenshot={
"deadzone": 0.2,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
fotocamera={
"deadzone": 0.2,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
RUN={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
book={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null)
]
}

BIN
screenshot/image0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://7ghjehqs4j27"
path.s3tc="res://.godot/imported/image0.png-3b86b3128890b69a8e8a73b591093467.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://screenshot/image0.png"
dest_files=["res://.godot/imported/image0.png-3b86b3128890b69a8e8a73b591093467.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

BIN
screenshot/image1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://mg17iqrf8xgc"
path.s3tc="res://.godot/imported/image1.png-b474bedb2cc5bcee942e9c3b2c84cfed.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://screenshot/image1.png"
dest_files=["res://.godot/imported/image1.png-b474bedb2cc5bcee942e9c3b2c84cfed.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

BIN
screenshot/image10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dakqkmhbv77y7"
path="res://.godot/imported/image10.png-67539a470109523097922938ab99169a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image10.png"
dest_files=["res://.godot/imported/image10.png-67539a470109523097922938ab99169a.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bg44bxeqcdmlx"
path="res://.godot/imported/image11.png-02f55c1a71184b5cc3587e6718bc3738.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image11.png"
dest_files=["res://.godot/imported/image11.png-02f55c1a71184b5cc3587e6718bc3738.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bmnpiteua7iyw"
path="res://.godot/imported/image12.png-009a39e227a443a69bed8bdb4fb7a593.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image12.png"
dest_files=["res://.godot/imported/image12.png-009a39e227a443a69bed8bdb4fb7a593.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ci6slasspf4v6"
path="res://.godot/imported/image13.png-47e851a49b394d1d2b33d9fd0edd2860.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image13.png"
dest_files=["res://.godot/imported/image13.png-47e851a49b394d1d2b33d9fd0edd2860.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://t5pe8cmk8v6x"
path="res://.godot/imported/image14.png-d7b40a9e3d3ae15146a4ffe470dd9bad.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image14.png"
dest_files=["res://.godot/imported/image14.png-d7b40a9e3d3ae15146a4ffe470dd9bad.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djkly4n76io46"
path="res://.godot/imported/image2.png-148dd12bc885c814912f9e05d90cc5bb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image2.png"
dest_files=["res://.godot/imported/image2.png-148dd12bc885c814912f9e05d90cc5bb.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ea7ta7c6p35g"
path="res://.godot/imported/image3.png-6834afe3134654639574c5384d11df75.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image3.png"
dest_files=["res://.godot/imported/image3.png-6834afe3134654639574c5384d11df75.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uk51aoaral8h"
path="res://.godot/imported/image4.png-d20f724e98a6fbf498199a97ecb1c3df.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image4.png"
dest_files=["res://.godot/imported/image4.png-d20f724e98a6fbf498199a97ecb1c3df.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://gruq2tymys6h"
path="res://.godot/imported/image5.png-0aa59491c4101b108e458d9ca07a8140.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image5.png"
dest_files=["res://.godot/imported/image5.png-0aa59491c4101b108e458d9ca07a8140.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ulfojuy1oou5"
path="res://.godot/imported/image6.png-0935add0654816d1fc98cf7362ba74f5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image6.png"
dest_files=["res://.godot/imported/image6.png-0935add0654816d1fc98cf7362ba74f5.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dh048qqwdfh7y"
path="res://.godot/imported/image7.png-6583b522a3184dec1c5d62f2c163681f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image7.png"
dest_files=["res://.godot/imported/image7.png-6583b522a3184dec1c5d62f2c163681f.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmrqqsqsor1bs"
path="res://.godot/imported/image8.png-51ca9aeaa88925891c6d3d2994ce927c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image8.png"
dest_files=["res://.godot/imported/image8.png-51ca9aeaa88925891c6d3d2994ce927c.ctex"]
[params]
compress/mode=0
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/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=1

BIN
screenshot/image9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://6k4sv5vvks4n"
path="res://.godot/imported/image9.png-3ff65f7aa84552aff7a480fa8d46d267.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshot/image9.png"
dest_files=["res://.godot/imported/image9.png-3ff65f7aa84552aff7a480fa8d46d267.ctex"]
[params]
compress/mode=0
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/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=1

21
visto.tscn Normal file
View file

@ -0,0 +1,21 @@
[gd_scene load_steps=4 format=3 uid="uid://bk2nxxt5jfmhw"]
[ext_resource type="Script" uid="uid://br3i356g3fo3f" path="res://ball.gd" id="1_6drh8"]
[sub_resource type="SphereShape3D" id="SphereShape3D_u2vub"]
[sub_resource type="SphereMesh" id="SphereMesh_lqgjk"]
[node name="focus" type="StaticBody3D" groups=["punti focus"]]
script = ExtResource("1_6drh8")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_u2vub")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_lqgjk")
[node name="VisibleOnScreenNotifier3D" type="VisibleOnScreenNotifier3D" parent="."]
[connection signal="screen_entered" from="VisibleOnScreenNotifier3D" to="." method="_on_visible_on_screen_notifier_3d_screen_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier3D" to="." method="_on_visible_on_screen_notifier_3d_screen_exited"]