diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-03-07 14:14:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-07 14:14:36 -0600 |
| commit | 719379a8a76ab0685f2bd14bebe2f0cd1e97f06b (patch) | |
| tree | ce5d6c62bc36fb1d1ec31083bc8e81a0109c12df /azalea-physics/src/collision/mod.rs | |
| parent | bf4ff517890cad3ff4e36b4b78959504192e5374 (diff) | |
| download | azalea-drasl-719379a8a76ab0685f2bd14bebe2f0cd1e97f06b.tar.xz | |
Bevy 0.10 (#79)
* replace 0.9.1 with 0.10.0
* start migrating to bevy .10
* well it compiles
* doesn't immediately panic
* remove unused imports
* fmt
* delete azalea-ecs
* make RelativeEntityUpdate an EntityCommand
* fix a doc test
* explain what FixedUpdate does
Diffstat (limited to 'azalea-physics/src/collision/mod.rs')
| -rw-r--r-- | azalea-physics/src/collision/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-physics/src/collision/mod.rs b/azalea-physics/src/collision/mod.rs index 7d934020..53efd2fe 100644 --- a/azalea-physics/src/collision/mod.rs +++ b/azalea-physics/src/collision/mod.rs @@ -7,7 +7,7 @@ mod world_collisions; use azalea_core::{Axis, Vec3, AABB, EPSILON}; use azalea_world::{ entity::{self}, - MoveEntityError, World, + Instance, MoveEntityError, }; pub use blocks::BlockWithShape; pub use discrete_voxel_shape::*; @@ -52,7 +52,7 @@ pub enum MoverType { // return var4; // } -fn collide(movement: &Vec3, world: &World, physics: &entity::Physics) -> Vec3 { +fn collide(movement: &Vec3, world: &Instance, physics: &entity::Physics) -> Vec3 { let entity_bounding_box = physics.bounding_box; // TODO: get_entity_collisions // let entity_collisions = world.get_entity_collisions(self, @@ -73,7 +73,7 @@ fn collide(movement: &Vec3, world: &World, physics: &entity::Physics) -> Vec3 { pub fn move_colliding( _mover_type: &MoverType, movement: &Vec3, - world: &World, + world: &Instance, position: &mut entity::Position, physics: &mut entity::Physics, ) -> Result<(), MoveEntityError> { @@ -186,7 +186,7 @@ pub fn move_colliding( fn collide_bounding_box( movement: &Vec3, entity_bounding_box: &AABB, - world: &World, + world: &Instance, entity_collisions: Vec<VoxelShape>, ) -> Vec3 { let mut collision_boxes: Vec<VoxelShape> = Vec::with_capacity(entity_collisions.len() + 1); |
