Kinematic bodies, inactive GameObjects, and a disabled body is not written back (#72) #104
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/cinnabar!104
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-72-kinematic-inactive-bodies"
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?
Closes #72. Part of #67.
What
Rigidbodyhands its owner's World Transform to Box3D throughBody_SetTargetTransformbefore each step and is never written back, so the Scene API is the authority for where it is and a dynamic cube resting on it is carried by contact.Rigidbodywhose owner is not Active in Hierarchy has its body disabled before the step it is first seen inactive and enabled again when seen active. A disabled body is skipped by the write-back.Rigidbody.on_addhonours an authoredbody_type; only the zero value (Static) is coerced to Dynamic, as before.Box_Colliderfriction defaults to Box3D's 0.6 when zero, the way density already does. Without it nothing rides a moving platform. ADR-0016's dated note records this alongside the kinematic and inactive behaviour.Collider migration onto a new
Rigidbody(the third criterion) was implemented in #71 and its test still passes unchanged.Tests
tests/core/box3d_plugin_test.odin, all Headless: a kinematic platform moved each step through the Scene API is exactly where it was put and carries a rested cube; deactivating a falling cube's ancestor freezes its World Transform bit-for-bit and reactivating resumes the fall; an inactiveRigidbodylets a cube fall through it.Deviations from the issue wording
Rigidbodystill has no spelling, sinceBody_Type's zero is Static andon_addreads zero as Dynamic.Verification
just checkpasses. Core suite 363 tests, platform, vulkan_backend, imgui and luau suites all pass. The two shaderc tests fail onmaintoo (locally stale committed shader output); unrelated.