Skip to content

Add mapping mode for physics props - #355

Draft
IsaacThoman wants to merge 1 commit into
devfrom
codex/mapping-mode
Draft

Add mapping mode for physics props#355
IsaacThoman wants to merge 1 commit into
devfrom
codex/mapping-mode

Conversation

@IsaacThoman

Copy link
Copy Markdown
Member

Summary

Adds an in-game Mapper Mode for authoring map physics props:

  • Enables mapper mode with ?mode=mapping, ?mapping=1, #mapping, or F7.
  • Adds a no-clip/free-fly authoring overlay that can ray-select named static GLB nodes.
  • Lets players map selected static nodes to configurable physics props, including model URL, scale, velocity, angular velocity, doPhysics, playersCollide, and health.
  • Exports replacement map JSON with staticPropExclusions plus props, so selected static GLB nodes can be removed from static collision/rendering and represented as physics props instead.
  • Teaches client and server static collision/physics loaders to skip excluded GLB node names.

Validation

  • deno task allchecks
  • Browser smoke test on http://localhost:4178/?mode=mapping:
    • confirmed current rebuilt bundle loaded on a fresh origin
    • confirmed map rendered
    • selected static node Cube004 from the game view
    • added it as a banana physics prop
    • changed exported health, velocity, and player-collision settings
    • verified exported JSON contains staticPropExclusions: ["Cube004"] and a configured /models/simplified_banana_1.glb prop
  • Server compatibility check with MapData.fromJSON(...) and PhysicsEngine.create("deathmatch_1", ["Cube004"])

Notes

The in-app browser had a stale service worker on port 4177, so browser validation was performed on a clean localhost origin at port 4178.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant