removed the horror aspect from the old project
This commit is contained in:
		| @@ -60,6 +60,11 @@ flashlight={ | ||||
| "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":70,"key_label":0,"unicode":102,"echo":false,"script":null) | ||||
| ] | ||||
| } | ||||
| jump={ | ||||
| "deadzone": 0.5, | ||||
| "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":32,"key_label":0,"unicode":32,"echo":false,"script":null) | ||||
| ] | ||||
| } | ||||
|  | ||||
| [rendering] | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,5 @@ | ||||
| [resource] | ||||
| background_mode = 2 | ||||
| background_energy_multiplier = 0.0 | ||||
| ambient_light_source = 1 | ||||
| fog_enabled = true | ||||
| fog_light_color = Color(0.0705882, 0.0666667, 0.0666667, 1) | ||||
| fog_density = 1.0 | ||||
|   | ||||
| @@ -14,3 +14,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 5.23956) | ||||
|  | ||||
| [node name="StaticBody3D" parent="." instance=ExtResource("3_30m3x")] | ||||
| transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.5, 0.027395, 0) | ||||
|  | ||||
| [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] | ||||
| transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0) | ||||
|  | ||||
| [node name="DirectionalLight3D2" type="DirectionalLight3D" parent="."] | ||||
| transform = Transform3D(-0.866016, 0.29244, -0.40558, 0.5, 0.5, -0.707107, -0.00399622, -0.815156, -0.579228, 0, 0, 0) | ||||
| light_energy = 0.5 | ||||
|   | ||||
| @@ -1,7 +1,6 @@ | ||||
| [gd_scene load_steps=4 format=3 uid="uid://gg5ph541e4p3"] | ||||
| [gd_scene load_steps=3 format=3 uid="uid://gg5ph541e4p3"] | ||||
|  | ||||
| [ext_resource type="Script" path="res://scripts/player.gd" id="1_8d33x"] | ||||
| [ext_resource type="Texture2D" uid="uid://2xwafdhiha6x" path="res://assets/textures/world/flashlight_effect.png" id="1_rxdpg"] | ||||
|  | ||||
| [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_2qx4s"] | ||||
| height = 1.9 | ||||
| @@ -15,13 +14,3 @@ shape = SubResource("CapsuleShape3D_2qx4s") | ||||
| [node name="Camera3D" type="Camera3D" parent="."] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8, 0) | ||||
| current = true | ||||
|  | ||||
| [node name="SpotLight3D" type="SpotLight3D" parent="Camera3D"] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.25, -0.25, 0) | ||||
| light_energy = 3.0 | ||||
| light_indirect_energy = 4.0 | ||||
| light_volumetric_fog_energy = 4.0 | ||||
| light_projector = ExtResource("1_rxdpg") | ||||
| shadow_enabled = true | ||||
| spot_range = 72.0 | ||||
| spot_angle = 40.9175 | ||||
|   | ||||
| @@ -2,19 +2,24 @@ extends CharacterBody3D | ||||
|  | ||||
|  | ||||
| const SPEED = 5.0 | ||||
| const JUMP_VELOCITY = 4.5 | ||||
|  | ||||
| var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity") | ||||
|  | ||||
| @onready var camera: Camera3D = $Camera3D | ||||
|  | ||||
| @onready var light: SpotLight3D = $Camera3D/SpotLight3D | ||||
|  | ||||
| var camera_senitivity: float = 0.5 | ||||
|  | ||||
| func _ready() -> void: | ||||
| 	capture() | ||||
|  | ||||
| func _physics_process(delta: float) -> void: | ||||
| 	if not is_on_floor(): | ||||
| 		velocity.y -= gravity * delta | ||||
| 	 | ||||
| 	if Input.is_action_just_pressed("jump") and is_on_floor(): | ||||
| 		velocity.y = JUMP_VELOCITY | ||||
| 	 | ||||
| 	var input_dir := Input.get_vector("move_left", "move_right", "move_forward", "move_backward") | ||||
| 	var direction := (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() | ||||
| 	if direction: | ||||
| @@ -35,8 +40,6 @@ func _input(event: InputEvent) -> void: | ||||
| 		capture(false) | ||||
| 	if event.is_action_pressed("mouse_capture"): | ||||
| 		capture() | ||||
| 	if event.is_action_pressed("flashlight"): | ||||
| 		light.visible = !light.visible | ||||
|  | ||||
|  | ||||
| func _notification(what: int) -> void: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user