libgdx/libgdx — pull request #2202 by davebaol (2014-08-04 13:31:51+00:00)
Title: Added steering behaviors to gdx-ai extension.

This PR adds steering behaviors for 2D and 2.5D, suitable for most games.
Most steering behaviors work for full 3D too, excluded those behaviors that explicitly have an angular component, such as ReachOrientation, Face, LookWhereYouAreGoing and Wander (this is because we would need to change the representation of orientation and angular velocity from float values to Vector3 and Quaternion).
The other behaviors only work linearly, so none of them requires any modification for full 3D because the equations work unaltered.
Notice that the entire steering framework assumes that the direction a character is facing does not have to be its direction of motion, thus supporting independent facing that, among other things, allows you to smooth rotation over many frames when the direction abruptly changes.

Mainly the developer will have to implement the Steerable interface for the specific "engine" he's using: scene2d, box2d, bullet, his own engine or anything else.
Test classes use scene2d for the sake of simplicity.

@NathanSweet and @Xoppa
In the test classes I'm using `com.badlogic.gdx.tests.g3d.BaseG3dHudTest.CollapsableWindow`.
Looks like I have to use a `ScrollPane` to make it work properly.
Without the scrollpane when you double-click the title bar to expand the collapsed window one of the sliders may riceive both click events depending on the specific layout.
Using `stage.setDebugAll(true)` you can clearly see that when the window is collapsed the title bar is vertically centered to the layout and the underlying non-visible components will receive click events.
To replicate the issue replace
````java
ScrollPane pane = new ScrollPane(table, container.skin);
pane.setFadeScrollBars(false);
window.add(pane);
````
with
````java
window.add(table);
````
inside the `createDetailWindow` method of the class `com.badlogic.gdx.tests.ai.steer.SteeringTest`.
Then run the Face behavior of the SteeringBehaviorTest. The "Deceleration Radius" slider will change when the Face window is collapsed and you click on the title bar.
Any idea how to fix this?