Skip to content

Commit

Permalink
you spin me right now baby right now
Browse files Browse the repository at this point in the history
  • Loading branch information
vavakado committed Apr 25, 2024
1 parent efe20d7 commit 4eba9fa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion elements/game.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ background_energy_multiplier = 2.25
[node name="game" type="Node3D"]

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.0575641, -0.864589, 0.499171, 0, 0.5, 0.866025, -0.998342, -0.049852, 0.028782, 0, 0, 0)
transform = Transform3D(0.0575641, -0.864589, 0.499171, 0, 0.5, 0.866025, -0.998342, -0.049852, 0.0287821, 0, 0, 0)
shadow_enabled = true
shadow_blur = 3.516

[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
use_collision = true
Expand Down
8 changes: 7 additions & 1 deletion elements/player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ script/source = "extends CharacterBody3D

const MAX_SPEED = 10.0
const ACC = 10
const SENS = 0.001

func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED

func _physics_process(delta):
var dir = Vector3(Input.get_action_strength(\"D\") - Input.get_action_strength(\"A\"), 0, Input.get_action_strength(\"S\") - Input.get_action_strength(\"W\"))
Expand All @@ -14,7 +18,7 @@ func _physics_process(delta):
move_and_slide()
#
#const JUMP_VELOCITY = 4.5
const SENS = 0.01

#const ACC = 10
#var gravity = ProjectSettings.get_setting(\"physics/3d/default_gravity\")
#
Expand Down Expand Up @@ -43,6 +47,7 @@ func _unhandled_input(event):
if event is InputEventMouseMotion:
$\".\".rotate_y(-event.relative.x * SENS)
camera.rotate_x(-event.relative.y * SENS)
camera.rotation.x = clamp(camera.rotation.x, deg_to_rad(-90), deg_to_rad(90))
"
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_qmodh"]
Expand All @@ -65,3 +70,4 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.95, 0)
[node name="Camera3D" type="Camera3D" parent="cam_head"]
fov = 108.1
size = 6.405
far = 100.0
9 changes: 9 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ sprint={
"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,"echo":false,"script":null)
]
}

[physics]

common/physics_ticks_per_second=120

[rendering]

lights_and_shadows/directional_shadow/size=8192
anti_aliasing/quality/msaa_3d=1

0 comments on commit 4eba9fa

Please sign in to comment.