From 5e2018d3e43cbc10dcb971c88fff848dcadae4f4 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Tue, 12 Aug 2025 23:26:27 -0500 Subject: [PATCH] Docs for `physics` module --- src/physics.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/physics.rs b/src/physics.rs index dd6ab2d..efb57cd 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1,5 +1,19 @@ //! Custom physics items +//! //! TODO: Refactor in terms of Rapier2D, *or* implement colliders and remove it. +//! +//! Position, both translation and rotation, are tracked by the built-in +//! Bevy [`Transform`] component. This module adds a (Linear) [`Velocity`] and +//! [`AngularVelocity`] component to the mix. +//! These two components are operated by simple integrator systems to +//! accumulate translation and rotation from the velocities. +//! +//! The [`Wrapping`] component marks things that should wrap around the world +//! boundaries. It's a kind of physical property of this world, so I'm putting +//! it here. +//! +//! Collisions are also considered physics. After all, I got *a physics engine* +//! to detect them for me (so that I don't have to write clipping code). use crate::{ WorldSize, events,