Skip to content

Enable CCD for lander sky collisions and remove manual ceiling clamp#3

Open
chungwu wants to merge 5 commits into
mainfrom
codex/fix-lander-ceiling-boundary-bug
Open

Enable CCD for lander sky collisions and remove manual ceiling clamp#3
chungwu wants to merge 5 commits into
mainfrom
codex/fix-lander-ceiling-boundary-bug

Conversation

@chungwu

@chungwu chungwu commented Jan 6, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Landers could tunnel past the sky ceiling in a single physics step and end up above world bounds, preventing correct bounce behavior.
  • The previous fix clamped landers to the ceiling in enforceSkyBoundary, which bypassed the physics engine and prevented normal restitution/spring response.
  • Using continuous collision detection (CCD) lets the physics engine detect fast collisions and apply restitution naturally.

Description

  • Enabled CCD on the lander rigid body by calling .setCcdEnabled(true) in Lander.create so Rapier will detect high-speed collisions with the sky collider.
  • Removed the manual ceiling clamp by deleting the enforceSkyBoundary call and implementation from game/game-state.ts so the engine’s collision response handles bounces.
  • Cleaned up imports in game/game-state.ts by removing the unused Vector2 import.

Testing

  • No automated tests were run for this change.

Codex Task

@vercel

vercel Bot commented Jan 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
combat-lander Ready Ready Preview, Comment Jan 6, 2026 4:59am

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant