initial commit

This commit is contained in:
Brazly
2026-01-13 03:47:51 +00:00
commit b58b59eb96
43 changed files with 3202 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
extends Node
@export var cameraSensitivity: float = 0.001

View File

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

View File

@@ -0,0 +1,40 @@
extends Camera3D
var rayRange = 2000
@onready var crosshair = %CrosshairCenter
@export var terminal: TerminalControls
func _physics_process(delta: float) -> void:
Get_Camera_Collision()
func Get_Camera_Collision():
var centre = get_viewport().get_size()/2
var rayOrigin = project_ray_origin(centre)
var rayEnd = rayOrigin + project_ray_normal(centre)*rayRange
var newIntersection = PhysicsRayQueryParameters3D.create(rayOrigin, rayEnd)
var intersection = get_world_3d().direct_space_state.intersect_ray(newIntersection)
var is_highlighted = not intersection.is_empty()
if crosshair and is_instance_valid(crosshair):
crosshair.set_highlight(is_highlighted)
func _input(event: InputEvent) -> void:
if event is InputEventKey and event.pressed and crosshair.is_highlighted:
if event.is_echo(): return
if event.keycode == KEY_BACKSPACE:
terminal.InputDelChar()
if event.unicode > 31:
var character = char(event.unicode)
if terminal: # Check that you assigned the node in the Inspector
terminal.InputChar(character)
if event.keycode == KEY_ENTER:
terminal.EnterCommand()

View File

@@ -0,0 +1 @@
uid://55cgjgncpb53

View File

@@ -0,0 +1,44 @@
extends Node3D
@onready var camera: Camera3D = $Camera3D
@export var verticalLookLimit: float = deg_to_rad(50)
@export var psxScene: PackedScene
var psxInstance: Node = null
var togglePsxEffect: bool = false
#@export var horizontalLookRightLimit: float = deg_to_rad(290)
#@export var horizontalLookLeftLimit: float = deg_to_rad(-196)
var cameraPitch: float = 0.0
var cameraYaw: float = 0.0
func _ready() -> void:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
var currentRot = camera.rotation
cameraPitch = currentRot.x
cameraYaw = currentRot.y
camera.rotation.z = 0.0
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
cameraPitch -= event.screen_relative.y * GlobalSettings.cameraSensitivity
cameraYaw -= event.screen_relative.x * GlobalSettings.cameraSensitivity
#cameraPitch = clamp(cameraPitch, -verticalLookLimit, verticalLookLimit)
#cameraYaw = clamp(cameraYaw, -horizontalLookLeftLimit, horizontalLookRightLimit)
cameraPitch = clamp(cameraPitch, -verticalLookLimit, verticalLookLimit)
camera.rotation = Vector3(cameraPitch, cameraYaw, 0)
if Input.is_action_just_released("PSX Theme toggle"):
togglePsxEffect = !togglePsxEffect
if togglePsxEffect:
psxInstance = psxScene.instantiate()
add_child(psxInstance)
else:
psxInstance.queue_free()
psxInstance = null

View File

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