Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: FxObj
Wraps jbox2d's FixtureDef (com.almasb.fxgl.physics.box2d.dynamics.FixtureDef), the blueprint passed to Body.createFixture. Holds friction, restitution, density, sensor flag, contact filter, shape, and user data. The Kotlin source provides a fluent API (friction(v), restitution(v), ...); the wrapper exposes both the getter/setter pairs and the fluent forms.
FixtureDef ()
Creates a new FixtureDef with jbox2d defaults.
adopt (object Ajo)
Wraps an existing FixtureDef AussomJavaObject.
getFriction ()
setFriction (double V)
getRestitution ()
setRestitution (double V)
getDensity ()
setDensity (double V)
isSensor ()
setSensor (bool V)
getFilter ()
Returns the Filter wrapper.
setFilter (object FilterObj)
Sets the Filter from a Filter wrapper.
getShape ()
Returns the Shape AJO (null when unset).
setShape (object ShapeAjo)
Sets the Shape AJO (use a Shape subclass AJO).
getUserData ()
setUserData (Data)
copy ()
Returns a deep copy of this fixture def.
friction (double V)
restitution (double V)
density (double V)
filter (object FilterObj)
shape (object ShapeAjo)
sensor (bool V)
userData (Data)

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.