Split physics parts into a submodule
The physics sim bits (that aren't Rapier2d) are now in their own submodule. I've included the `Wrapping` marker component because it doesn't really have anywhere else to live, and it's kinda sorta related to the physics. It controls the motion of objects... that's physics. :p There are name collisions between Rapier2d's `Velocity` and my own, but that's a problem for later. I've used more specific type paths where necessary to maintain the previous behavior. The `physics::Position` component can go away completely. It's just an extra copy of some of the built-in `Transform` data. I'm pretty sure it only exists because I didn't realize I could rely on directly manipulating the transform when I started this project.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use bevy::prelude::*;
|
||||
use bevy_rapier2d::prelude::*;
|
||||
|
||||
use crate::{GameAssets, Position, Rotation, Velocity, Wrapping};
|
||||
use crate::{GameAssets, Rotation, physics::Position, physics::Velocity, physics::Wrapping};
|
||||
|
||||
#[derive(Component)]
|
||||
pub struct Ship;
|
||||
|
||||
Reference in New Issue
Block a user