Make collision work horizontally

This commit is contained in:
crumblingstatue 2023-04-03 18:33:11 +02:00
parent f07bd9c713
commit 413875909e
2 changed files with 26 additions and 2 deletions

View file

@ -8,6 +8,7 @@ use crate::{
pub struct Player {
pub col_en: MobileEntity,
pub vspeed: f32,
pub hspeed: f32,
}
impl Player {
@ -15,6 +16,7 @@ impl Player {
Self {
col_en: MobileEntity::from_pos_and_bb(vec2(pos.x as i32, pos.y as i32), vec2(15, 24)),
vspeed: 0.0,
hspeed: 0.0,
}
}
pub fn center_tp(&self) -> TilePos {