Godot 4 (3d)
Problem with camera movement.
Hi! Here’s a newbie in Godot.
In my project I want to make camera orbiting around object on keyboard pressing. The best way as I can see is to make Node3d inside object, make camera child of this node and then rotate this Node3d in certain direction. But I can’t understand how to rotate it.
So I have something like…
extends Node3D
@onready var pivot = $cam_origin
@export var speed = 0.03func get_input_keyboard(delta):
var y_rotation = Input.get_axis(“Cam_Left”, “Cam_Right”)
??? (Vector3.UP, y_rotation * speed * delta);
And I can’t understand what to be instead ???. Pivot.rotate_y or rotation_y or something else?
Sorry for such stupid question.