How best would I create a rig that allows character movement and collision detection while also having a top down style camera that follows the player, allowing the player to rotate independently of the camera orientation? Also, Node3D doesn't have a function called "move_and_collide()", so is there a better node I should be using in it's place? The following is the code I am currently using.
extends Node3D
var rotationSpeed: float = 1.35
var rotationInput: int = 0
var movementSpeed: int = 5
var inputVector: Vector2 = Vector2()
var movementVector: Vector3 = Vector3()
func _ready() -> void:
pass
func _process(delta: float) -> void:
# Handle Movement
movementVector.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
movementVector.z = Input.get_action_strength("move_backward") - Input.get_action_strength("move_forward")
movementVector = movementVector.normalized() * delta * movementSpeed
translate(movementVector)
# Handle Rotation
rotationInput = Input.get_action_strength("rotate_right") - Input.get_action_strength("rotate_left")
rotate_y(delta * rotationSpeed * rotationInput)