Topic was automatically imported from the old Question2Answer platform.
Asked By
arbalezt
New to the engine and coding in general, how can i move the Camera3D Node?
i’ve tried
head.Transform.origin(0, 0, 0)
and
head = head.set_global_transform(0, 0, 1.2)
the former gives an error that says it cant get transform in base camera
and second one says invalid call setglobaltransform in base camera expected 1 arguements
Welcome to using Godot! You got it almost right. Transform.origin is property of the camera’s transform (and all Spatial objects’). To change them, you need to set them to a new value.
head.global_transform.origin = Vector3(0, 0, 0)
If you’re wondering whether you need to use transform or global_transform, it’s usually safer to go with global. The difference can be seen if node’s parent will move, scale or rotate.
That said, you might benefit trying making small 2D projects at first. Knowledge you’ll gain will directly benefit making 3D games as well.