Trackball Camera

An asset by Goutte
The page banner background of a mountain and forest
Trackball Camera hero image

Quick Information

1 ratings
Trackball Camera icon image
Goutte
Trackball Camera

A TrackballCamera that responds to input from mouse, keyboard, joystick and touch, in order to rotate around its parent node while continuously facing it.- stays around its parent node, even if it moves- no gimbal lock (quaternions ♥)- camera inertia for a smoother experience- the parent node does not have to be centered in the camera's view- a bunch of parameters to configure everything as you want it- won't work on godot 3

Supported Engine Version
2.1.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
6 years ago
Git URL
Issue URL

TrackballCamera for Godot

README MIT README Release README Donate

A simple Godot 2.1 addon that adds a TrackballCamera without gimbal lock.

The TrackballCamera responds to input from mouse, keyboard, joystick and touch, in order to rotate around its parent node while facing it.

Features

  • stays around its parent node, even if it moves
  • no gimbal lock (quaternions FTW)
  • camera inertia for a smoother experience
  • the parent node does not have to be centered in the camera's view
  • a bunch of parameters to configure everything as you want it

Install

The installation is as usual : copy this project as a subdirectory of your addons/ directory.

cd <myproject>/addons
git clone https://github.com/Goutte/godot-trackball-camera trackball_camera

Then, enable the plugin in Scene > Project Settins > Plugins.

Usage

Make the TrackballCamera a 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 mouseInvert and keyboardInvert to true in that case.

Todo

  • Test if touch works on android and html5, try SCREEN_DRAG otherwise.
  • Update to Godot 3.0 upon release

Feedback and contributions are welcome!

A TrackballCamera that responds to input from mouse, keyboard, joystick and touch, in order to rotate around its parent node while continuously facing it.

- stays around its parent node, even if it moves
- no gimbal lock (quaternions ♥)
- camera inertia for a smoother experience
- the parent node does not have to be centered in the camera's view
- a bunch of parameters to configure everything as you want it
- won't work on godot 3

Reviews

1 ratings
LittleMouseDev Rated positive

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

1 ratings
Trackball Camera icon image
Goutte
Trackball Camera

A TrackballCamera that responds to input from mouse, keyboard, joystick and touch, in order to rotate around its parent node while continuously facing it.- stays around its parent node, even if it moves- no gimbal lock (quaternions ♥)- camera inertia for a smoother experience- the parent node does not have to be centered in the camera's view- a bunch of parameters to configure everything as you want it- won't work on godot 3

Supported Engine Version
2.1.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
6 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers