This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends RayCast3D | |
@export var speed := 50.0 | |
@onready var remote_transform = RemoteTransform3D.new() | |
func _physics_process(delta: float) -> void: | |
position += global_basis * Vector3.FORWARD * delta * speed | |
target_position = Vector3.FORWARD * delta * speed | |
force_raycast_update() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends RigidBody3D | |
var mouse_sensitivity := 0.001 | |
var twist_input := 0.0 | |
var pitch_input := 0.0 | |
@onready var twist_pivot := $TwistPivot | |
@onready var pitch_pivot := $TwistPivot/PitchPivot | |
func _ready() -> void: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends CharacterBody3D | |
const SPEED = 5.0 | |
const JUMP_VELOCITY = 4.5 | |
# Get the gravity from the project settings to be synced with RigidDynamicBody nodes. | |
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity") | |
@onready var neck := $Neck | |
@onready var camera := $Neck/Camera3d |