diff --git a/src/model.rs b/src/model.rs index 76f7ba5..78bd5a1 100644 --- a/src/model.rs +++ b/src/model.rs @@ -90,6 +90,7 @@ pub struct ContactingLadder{ #[derive(Clone)] pub enum ContactingBehaviour{ Surf, + Cling,//usable as a zipline, or other weird and wonderful things Ladder(ContactingLadder), Elastic(u32),//[1/2^32,1] 0=None (elasticity+1)/2^32 } diff --git a/src/physics.rs b/src/physics.rs index caff5ec..4039dfb 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1108,6 +1108,7 @@ impl crate::instruction::InstructionConsumer for PhysicsStat let mut v=self.body.velocity; match &contacting.contact_behaviour{ Some(crate::model::ContactingBehaviour::Surf)=>println!("I'm surfing!"), + Some(crate::model::ContactingBehaviour::Cling)=>println!("Unimplemented!"), &Some(crate::model::ContactingBehaviour::Elastic(elasticity))=>{ let n=c.normal(&self.models); let d=n.dot(v)*Planar64::raw(-1-elasticity as i64);