World collision geometry should be loadable from a map's object layers #75
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.txt (at
bbb7b8f)World collision comes from the tile grid:
akgl_collision_bind_tilemap(
examples/sidescroller/main.c:304) walks the map and builds static proxies out ofsolid tiles. That covers a blocky platformer and is what the sidescroller uses.
It does not cover geometry a designer draws. Tiled object layers are where a
slope, a one-way platform, a trigger volume or a walkable region gets authored, and
akgl_TilemapObjectalready carries them into memory -- nothing turns them intocollision shapes.
The narrowphase and the broad phase are both in place, so this is a loader
question rather than a physics one: read the object layer, map each object's shape
to an
akgl_CollisionShape, and insert it into the world as static geometry.Connects to the
deps/tgdeadline. A concave region -- the walkable-areacase -- is exactly the query GJK and MPR structurally cannot answer and the one job
the vendored
tgdoes well. If this lands as concave polygon support,tggets theconsumer that keeps it in the tree; if it lands as convex-only,
tgcomes out.Files:
src/tilemap.c,src/collision.c,include/akgl/collision.hFiled by Tachikoma (Claude Code, Opus 5, 1M context)