A dungeon delver roguelike using Pathfinder 2nd edition rules
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Finished setting up basic camera movement, need to potentially add collision and whatnot

+65 -4
+15 -4
camera/camera.gd
··· 2 2 3 3 @export_group("Movement variables") 4 4 @export var move_speed: float = 2.0 5 - @export var gravity: float = 50.0 5 + @export var rotate_speed: float = 2.0 6 6 7 - var velocity: Vector3 = Vector3.ZERO 8 - 9 - @onready var spring_arm: Node3D = $SpringArm3D 7 + func _physics_process(delta: float) -> void: 8 + var move_direction: Vector3 = Vector3.ZERO 9 + 10 + move_direction.x = Input.get_action_strength("Right") - Input.get_action_strength("Left") 11 + move_direction.z = Input.get_action_strength("Down") - Input.get_action_strength("Up") 12 + 13 + move_direction *= move_speed 14 + 15 + var rotate_direction: float = Input.get_action_strength("RotateRight") - Input.get_action_strength("RotateLeft") 16 + var old_rotation: float = global_rotation_degrees.y 17 + 18 + move_direction = move_direction.rotated(Vector3.UP, deg_to_rad(old_rotation)) 19 + global_translate(move_direction) 20 + rotate(Vector3.UP, rotate_direction * rotate_speed)
+2
camera/camera.tscn
··· 4 4 5 5 [node name="Camera" type="Node3D"] 6 6 script = ExtResource("1_lw1ob") 7 + move_speed = 0.5 8 + rotate_speed = 1.0 7 9 8 10 [node name="SpringArm3D" type="SpringArm3D" parent="."] 9 11 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1.08832)
+4
dungeonRoom/dungeonRoom.tscn
··· 52 52 53 53 [node name="Camera" parent="." instance=ExtResource("14_cr8g4")] 54 54 transform = Transform3D(1, 0, 0, 0, 0.939693, 0.34202, 0, -0.34202, 0.939693, 0, 1.535, 0) 55 + rotate_speed = 0.05 56 + 57 + [node name="OmniLight3D" type="OmniLight3D" parent="."] 58 + transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.16817, 0)
+44
project.godot
··· 62 62 , 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) 63 63 ] 64 64 } 65 + Left={ 66 + "deadzone": 0.2, 67 + "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) 68 + , 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":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) 69 + , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) 70 + , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":false,"script":null) 71 + ] 72 + } 73 + Right={ 74 + "deadzone": 0.2, 75 + "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) 76 + , 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":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) 77 + , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) 78 + , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":false,"script":null) 79 + ] 80 + } 81 + Up={ 82 + "deadzone": 0.2, 83 + "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) 84 + , 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":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) 85 + , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null) 86 + , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":false,"script":null) 87 + ] 88 + } 89 + Down={ 90 + "deadzone": 0.2, 91 + "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) 92 + , 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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) 93 + , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null) 94 + , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":false,"script":null) 95 + ] 96 + } 97 + RotateLeft={ 98 + "deadzone": 0.2, 99 + "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) 100 + , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":false,"script":null) 101 + ] 102 + } 103 + RotateRight={ 104 + "deadzone": 0.2, 105 + "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":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) 106 + , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null) 107 + ] 108 + }