Merge Move and slide into Move with a 'Collide with solids' toggle

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Fable 5.1 committed 2026-09-07 15:50:52 +02:00
1 parent 6ecb20cf02
commit b0860ca07f
5 files changed
+24 -34

No files matched your search

+3 -3
View File
@@ -206,12 +206,12 @@ describe('move and slide', () => {
expect(crateA.x).toBe(-95);
});
it('the Move and slide node moves the owner and outputs the blocked axes', () => {
it('the Move node with "Collide with solids" moves the owner and outputs the blocked axes', () => {
const { project, stack, sceneId, behavior, a } = setup();
// On update → Move and slide(Owner, dx = 1000, dt) → Log(blocked x)
// On update → Move(Owner, dx = 1000, dt, collide) → Log(blocked x)
const update = new AddNodeCommand(behavior.id, 'OnUpdate', 0, 0);
const owner = new AddNodeCommand(behavior.id, 'Owner', 0, 0);
const move = new AddNodeCommand(behavior.id, 'MoveAndSlide', 0, 0, { dx: 1000 });
const move = new AddNodeCommand(behavior.id, 'Move', 0, 0, { dx: 1000, collide: true });
const log = new AddNodeCommand(behavior.id, 'Log', 0, 0);
for (const c of [update, owner, move, log]) stack.execute(c);
const connect = (from: AddNodeCommand, fp: string, to: AddNodeCommand, tp: string) =>