Physics stage 1a runs on Rapier: a new Rigidbody child object (body type, mass, gravity scale, damping, fixed rotation, CCD) makes its parent fall, bounce and come to rest in play, colliders gain friction, bounciness and density, the scene gains gravity (0, 980), the new PhysicsSystem steps at a fixed 60 Hz with interpolation in world coordinates and treats a tilemap as static ground, On collision enter gains normal and impulse, play waits for Rapier and does not start without it, and the editor run keeps the old CollisionSystem; the existing collision tests run against both systems unchanged (#146)
game-maker / gate (push) Successful in 1m46s
game-maker / suite (push) Successful in 6m17s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5 committed 2026-09-18 18:11:43 +02:00
1 parent d02bcca266
commit 78899b1ace
34 files changed
+2291 -676

No files matched your search

@@ -1,12 +1,15 @@
import type { NodeDef } from '../../NodeRegistry';
import { collisionOutputs } from '../shared';
import { collisionOutputs, contactOutputs } from '../shared';
export const OnCollisionEnter: NodeDef = {
type: 'OnCollisionEnter',
label: 'On collision enter',
category: 'event',
description: 'Runs once when a collider of the owner starts overlapping another collider.',
description:
'Runs once when a collider of the owner starts overlapping another collider. While playing, ' +
'normal x/y point from the other collider towards the own one and impulse says how hard they met ' +
'(both 0 for a trigger).',
inputs: [],
outputs: collisionOutputs(),
outputs: [...collisionOutputs(), ...contactOutputs()],
params: [],
};
+10
View File
@@ -31,6 +31,16 @@ export const collisionOutputs = (): PortDef[] => [
obj('collider'),
];
/**
* What only the start of a contact knows: which way the other side pushes (a unit vector pointing
* from it towards the own collider) and how hard they met. The physics engine works both out (#146).
*/
export const contactOutputs = (): PortDef[] => [
num('normalX', 'normal x'),
num('normalY', 'normal y'),
num('impulse'),
];
export const keyParam: PropertyDef = { key: 'key', label: 'Key', kind: 'key', default: 'ArrowRight' };
/** No `assetTypes`: any placeable asset is a valid answer here. */