3.xaddon that adds a
TrackballCameranode without gimbal lock.
TrackballCameraresponds to input from mouse, keyboard, joystick and touch, in order to rotate around its parent node while facing it.
A version for Godot
2.xis available as well.
The installation is as usual, through the Assets Library. Then, enable the plugin in
Scene > Project Settings > Plugins.
You can also simply copy the files of this project into yours, it should work.
TrackballCameraa child of the node to trackball around. Make sure your camera initially faces said node, and is at a proper distance from it. The initial position of your camera matters. The node does not need to be in the center.
You can also use this camera to look around you if you place it atop its parent node, spatially. It's going to rotate around itself, and that amounts to looking around. You'll probably want to set
keyboard_invertto true in that case.
SCREEN_DRAGotherwise. (see #6)
Feedback and contributions are welcome!