rust-bevy-fixed-step-physics

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Rust Bevy Fixed Step Physics

Rust Bevy 固定步长物理

Use this skill to separate deterministic simulation from frame-rate-dependent presentation in Bevy games.
使用此 skill 将确定性模拟与依赖帧率的表现层分离到 Bevy 游戏中。

Core Workflow

核心工作流

  1. Identify which movement must be deterministic and collision-safe.
  2. Sample input in update systems, then apply movement in fixed-step systems.
  3. Store velocity, acceleration, and intent explicitly in components/resources.
  4. Predict or sweep movement before committing positions.
  5. Emit physics/collision events; keep animation and particles as presentation.
  6. Interpolate or tween visuals when fixed simulation looks choppy.
  1. 确定哪些移动必须是确定性的,并确保碰撞安全。
  2. 在 update system 中采样输入,然后在 fixed-step system 中应用移动。
  3. 在 component/resource 中显式存储速度、加速度和移动意图。
  4. 在提交位置之前预测移动或执行扫掠。
  5. 发出物理/碰撞事件;将动画和粒子保留在表现层。
  6. 当固定步长模拟看起来卡顿时,对视觉效果进行插值或补间。

Read Next

后续阅读

TaskLoad
Fix frame-rate-dependent movement
guidelines.md
,
workflows/stabilize-physics.md
Add fixed movement and collision prediction
references/fixed-step-patterns.md
Separate animation from physics
references/fixed-step-patterns.md
任务加载
修复依赖帧率的移动
guidelines.md
,
workflows/stabilize-physics.md
添加固定移动和碰撞预测
references/fixed-step-patterns.md
将动画与物理分离
references/fixed-step-patterns.md

Source Notes

来源说明

Guidance is transformed and paraphrased from Herbert Wolverson, Advanced Hands-On Rust, especially Chapters 7 through 9 on movement, collision, and smoothing. Examples are original skeletons.
指导内容改编并转述自 Herbert Wolverson 的 Advanced Hands-On Rust,尤其是关于移动、碰撞和平滑处理的第 7 至第 9 章。示例为原创骨架。