54 ES_PROPERTY(min=0, tooltip=
"Kilograms. 0 = from its shape at the density of water (a ball of 10 cm radius is 4.2 kg).")
170 ES_PROPERTY(asset =
mesh, tooltip=
"Geometry (.esmesh) to collide against.")
198 ES_PROPERTY(asset =
mesh, tooltip=
"Geometry (.esmesh) whose convex hull collides.")
How a solver is allowed to move a body — the one answer both worlds give.
Math utilities and GLM configuration for ESEngine.
Reflection and metadata system for automatic binding generation.
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
Core type definitions and utilities for ESEngine.
std::uint32_t u32
Unsigned 32-bit integer.
float f32
32-bit floating point
An axis-aligned box, sized in world units around the entity's origin.
glm::vec3 center
Where the shape sits from the entity's origin, in world units; zero is centred on it.
bool isSensor
A sensor reports overlaps and stops nothing.
An upright capsule — the shape a character is.
glm::vec3 center
Where the shape sits from the entity's origin, in world units; zero is centred on it.
A kinematic mover for a 3D player or NPC.
glm::vec3 realVelocity
Output: what it actually moved, per second, after collisions.
f32 mass
Mass used when it pushes dynamic bodies.
f32 halfHeight
Half the cylinder; total height is 2*(halfHeight + radius).
glm::vec3 floorNormal
Output: the floor's normal; zero while airborne.
f32 maxSlope
Steepest ground it can stand on. Beyond this it slides.
bool isOnFloor
Output: standing on ground it can walk on.
glm::vec3 velocity
Desired velocity in world units/second. A positive y is a jump.
f32 snapDown
How far it reaches down to stay on the floor over a crest. 0 = off.
f32 radius
World units, as every length here: these defaults are a 1.6 m person at the reference scale of 100 un...
u32 layer
Which collision layer it is in (0..15).
f32 stepHeight
Tallest step it climbs instead of stopping at. 0 = climbs nothing.
f32 pushForce
How hard it can shove what it walks into, in newtons. A character is swept rather than solved,...
The convex hull of imported geometry — a shape a solver can push.
resource::MeshHandle mesh
Geometry whose hull is the shape. Its concave detail is filled in.
Imported geometry, used as it is, for a level to collide against.
resource::MeshHandle mesh
The geometry to collide against. Its triangles are used directly.
u32 layer
Which collision layer the geometry is in (0..15).
bool enabled
Disabled bodies are left out of the world entirely.
f32 mass
Its mass in kilograms. 0 = as heavy as its shape at the density of water, a ball of 10 cm radius 4....
u32 layer
Which collision layer this body is in (0..15). ONE layer, unlike the 2D world's category bits: Jolt c...
bool continuousCollision
Checks the whole path a step covers rather than where the body ended up. What a bullet needs: discret...
f32 gravityScale
Scales this body's share of the world's gravity. 0 = weightless.
bool fixedRotation
Keeps the body upright: the solver may move it, never turn it. What a character on legs wants,...
BodyType bodyType
Static never moves, Kinematic is moved by hand, Dynamic is solved.
glm::vec3 center
Where the shape sits from the entity's origin, in world units; zero is centred on it.