Skip to content

Add force/torque accumulation pipeline#148

Merged
stainlu merged 1 commit intomainfrom
worktree-agent-a6695656
Apr 8, 2026
Merged

Add force/torque accumulation pipeline#148
stainlu merged 1 commit intomainfrom
worktree-agent-a6695656

Conversation

@stainlu
Copy link
Copy Markdown
Owner

@stainlu stainlu commented Apr 8, 2026

Summary

  • Adds ExternalForce component with force: Vec3, torque: Vec3, and persistent: bool fields
  • Adds apply_external_forces step in physics_step_single between gravity and integration
  • One-shot forces auto-clear after each step; persistent forces remain until manually zeroed
  • Forces on sleeping bodies wake them; static bodies are ignored

Test plan

  • 7 new unit tests: constant force/torque growth, one-shot clearing, persistent behavior, sleep wake, static ignore
  • All 63 physics tests pass
  • cargo check --workspace clean
  • cargo clippy --workspace -- -D warnings clean

🤖 Generated with Claude Code

Introduces a general-purpose force/torque system for the physics engine.
External code (gameplay, wind, thrusters) can now apply forces through
ExternalForce components instead of directly mutating Velocity.

- Add ExternalForce component with force, torque, and persistent flag
- Add apply_external_forces step in physics_step_single between gravity and integration
- One-shot forces auto-clear; persistent forces remain until manually zeroed
- Forces on sleeping bodies wake them automatically
- 7 new unit tests covering all force/torque behaviors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying euca-engine with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7b2acb9
Status: ✅  Deploy successful!
Preview URL: https://c028ebbe.euca-engine.pages.dev
Branch Preview URL: https://worktree-agent-a6695656.euca-engine.pages.dev

View logs

@stainlu stainlu merged commit b182719 into main Apr 8, 2026
4 of 8 checks passed
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