wip
This commit is contained in:
parent
4023ae60b1
commit
2a73f8a469
@ -980,6 +980,14 @@ impl PhysicsContext<'_>{
|
||||
}
|
||||
}
|
||||
impl PhysicsData{
|
||||
pub fn trace_ray(&self,ray:strafesnet_common::bvh::Ray)->Option<ModelId>{
|
||||
let (time,convex_mesh_id)=self.bvh.sample_ray(&ray,Time::ZERO,Time::MAX,|&model,ray|{
|
||||
let mesh=self.models.mesh(model);
|
||||
// TODO: ray tracing lol
|
||||
None
|
||||
})?;
|
||||
Some(convex_mesh_id.model_id.into())
|
||||
}
|
||||
/// use with caution, this is the only non-instruction way to mess with physics
|
||||
pub fn generate_models(&mut self,map:&map::CompleteMap){
|
||||
let mut modes=map.modes.clone();
|
||||
|
Loading…
x
Reference in New Issue
Block a user