rust-bevy-fixed-step-physics
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRust 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
核心工作流
- Identify which movement must be deterministic and collision-safe.
- Sample input in update systems, then apply movement in fixed-step systems.
- Store velocity, acceleration, and intent explicitly in components/resources.
- Predict or sweep movement before committing positions.
- Emit physics/collision events; keep animation and particles as presentation.
- Interpolate or tween visuals when fixed simulation looks choppy.
- 确定哪些移动必须是确定性的,并确保碰撞安全。
- 在 update system 中采样输入,然后在 fixed-step system 中应用移动。
- 在 component/resource 中显式存储速度、加速度和移动意图。
- 在提交位置之前预测移动或执行扫掠。
- 发出物理/碰撞事件;将动画和粒子保留在表现层。
- 当固定步长模拟看起来卡顿时,对视觉效果进行插值或补间。
Read Next
后续阅读
| Task | Load |
|---|---|
| Fix frame-rate-dependent movement | |
| Add fixed movement and collision prediction | |
| Separate animation from physics | |
| 任务 | 加载 |
|---|---|
| 修复依赖帧率的移动 | |
| 添加固定移动和碰撞预测 | |
| 将动画与物理分离 | |
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 章。示例为原创骨架。