Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ItsXj |
Code:$Camera.rotate_y(deg2rad(-event.relative.x * mouse_sensitivity))
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ItsXj |
Code:$Camera.rotate_y(deg2rad(-event.relative.x * mouse_sensitivity))
Reply From: | kidscancode |
$Camera
is the same as get_node("Camera")
, which means “get a child node named ‘Camera’”. It seems likely that “Camera” is not a child of the node you have this script on, so you need the correct path to the node.
Note, you can drag a node from the SceneTree into the scripting window and it will paste the node’s path.