Basics
Guides
API Reference
Basics
Guides
API Reference
[23:7] extends: FxObj
Wraps FXGL's PhysicsUnitConverter
(com.almasb.fxgl.physics.PhysicsUnitConverter), the interface
that converts between JavaFX pixel units and jbox2d meter units.
Box2D's solver works in meters; FXGL keeps gameplay code in
pixels and uses a converter to bridge the two whenever a
Body or Fixture is constructed.
The default converter scales at 50 pixels per meter; the engine
exposes the live converter through the PhysicsWorld.
Aussom users do not construct one directly; obtain it from
physicsWorld.getJBox2DWorld() or use the unit-aware helpers
on BoundingShape / Body.
PhysicsUnitConverter ()
Empty default constructor; populated by adopt.
adopt (object Ajo)
Wraps an existing PhysicsUnitConverter AussomJavaObject.
Ajo is an AussomJavaObject around a PhysicsUnitConverter.A new wrapper.toMeters (double Pixels)
Converts a pixel value to box2d meters.
Pixels is a double pixel value.A double in meters.toPixels (double Meters)
Converts a meter value to pixels.
Meters is a double meter value.A double in pixels.toPoint (object PointAjo)
Converts a Point2D (pixel coords) to a Vec2 (meter coords).
PointAjo is a javafx.geometry.Point2D AJO.A Vec2 wrapper in meters.toPixelPoint (object VecObj)
Converts a Vec2 (meter coords) to a Point2D (pixel coords).
VecObj is a Vec2 wrapper.A javafx.geometry.Point2D AJO.toVector (object PointAjo)
Converts a Point2D (pixel coords) to a Vec2 (meter coords) via the toVector overload (alias of toPoint with the same semantics but takes a Point2D).
PointAjo is a javafx.geometry.Point2D AJO.A Vec2 wrapper in meters.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.