forked from StrafesNET/strafe-client
halfsize
This commit is contained in:
parent
e936be4f3c
commit
2a13c57553
@ -90,7 +90,7 @@ impl MouseInterpolationState {
|
||||
|
||||
pub struct PhysicsState {
|
||||
pub body: Body,
|
||||
pub hitbox_size: glam::Vec3,
|
||||
pub hitbox_halfsize: glam::Vec3,
|
||||
pub contacts: std::collections::HashSet::<RelativeCollision>,
|
||||
//pub intersections: Vec<ModelId>,
|
||||
//temp
|
||||
@ -358,7 +358,7 @@ impl PhysicsState {
|
||||
fn mesh(&self) -> TreyMesh {
|
||||
let mut aabb=Aabb::new();
|
||||
for vertex in Aabb::unit_vertices(){
|
||||
aabb.grow(self.body.position+self.hitbox_size*vertex);
|
||||
aabb.grow(self.body.position+self.hitbox_halfsize*vertex);
|
||||
}
|
||||
aabb
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ impl strafe_client::framework::Example for Skybox {
|
||||
contacts: std::collections::HashSet::new(),
|
||||
models_cringe_clone: modeldatas.iter().map(|m|strafe_client::body::Model::new(m.transform)).collect(),
|
||||
walk_target_velocity: glam::Vec3::ZERO,
|
||||
hitbox_size: glam::vec3(2.0,5.0,2.0),
|
||||
hitbox_halfsize: glam::vec3(1.0,2.5,1.0),
|
||||
};
|
||||
|
||||
let camera_uniforms = camera.to_uniform_data(physics.body.extrapolated_position(0));
|
||||
|
Loading…
Reference in New Issue
Block a user