TravelTilt

public final class TravelTilt

Turns a model's travel into a tilt: each tick it reads where the body is, smooths that into a velocity, works out the lean the TravelOrientation asks for at that speed and direction, and turns the current tilt toward it at a limited rate, easing in at the end. A stopped model eases back upright. The tilt is a world-space rotation applied to the whole model after its facing (see ModeledEntity#setBodyTilt).

One instance belongs to one model and is only stepped by its model tick.

Constructors

Link copied to clipboard
public void TravelTilt()

Functions

Link copied to clipboard
public void reset()
Forgets the motion seen so far and stands the model upright at once.
Link copied to clipboard
public Quaterniond step(double x, double y, double z, float yaw, TravelOrientation settings, boolean free)
Advances one tick.
Link copied to clipboard
public Vector3d velocity(Vector3d result)
The smoothed velocity, in blocks per tick.