#how do I rotate the camera with the player, who's walking in a top-down 2d world?

4 messages · Page 1 of 1 (latest)

river spire
#

Uncheck the ignore_rotation property on the camera. If it's a child of the player, it will work automatically, otherwise just update its rotation as you would expect it to work normally.

rigid grove
#

not working..

#

here's my player code

extends CharacterBody2D


@export var move_speed = 250

@onready var camera: Camera2D = $Camera2D


func _physics_process(delta):
    if !ui.inventory_open:
        velocity = Input.get_vector("move_left", "move_right", "move_up", "move_down").normalized() * move_speed
        move_and_slide()