The falling-cubes sample #74
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/cinnabar#74
Loading…
Reference in a new issue
No description provided.
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?
Parent
Part of #67.
What to build
The sample is a physics demo.
sample_scenedeclaresrequireson the mesh Interface and the Physics Interface and builds a Scene of GameObjects: a static plane (a wide, thinBox_Colliderand aMesh_Rendereron the shared cube mesh scaled by the local transform) and a fixed camera framing the plane and the drop column. It has nodrawhook and never submits; the mesh pipeline draws the Components.Spawning runs in
fixed_updateon an accumulator: the first cube on the first fixed step, then one per spawn interval of simulated time. Each cube is a GameObject at the drop height with a random offset inside the spawn radius, a uniformly random unit quaternion orientation, a random colour, andMesh_Renderer,Rigidbody(Dynamic) andBox_Collider(half extents 0.5). Randomness comes from a generator seeded by aseedparameter. A cube whose World Transform falls well below the plane has its GameObject destroyed.Paramsbecomes seed, spawn interval, drop height, spawn radius, plane half extent. The grid, hero cube,-instances,-degeneracyand their tests go;-seed:Narrives;-framesand-dump-framestay. Both executables list mesh pipeline, thenbox3d, thensample_scene, then controls, with a comment saying which orderings Core enforces.Acceptance criteria
sample_scenebeforebox3dfailsengine_initwith the missing-Interface error.Blocked by