Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AutoRotationComponent

[16:7] extends: Component

Wraps FXGL's AutoRotationComponent (com.almasb.fxgl.dsl.components.AutoRotationComponent), which rotates the entity each tick to face the direction of motion (computed from the previous-to-current position delta). Angle range is -180..180.

Methods

  • AutoRotationComponent ()

    Creates a new AutoRotationComponent.

  • adopt (object Ajo)

    Wraps an existing AutoRotationComponent AussomJavaObject.

  • withSmoothing ()

    Enables smoothing so the rotation interpolates toward the target angle instead of snapping each tick.

    • @r this object