unpub a bunch of physics stuff
This commit is contained in:
parent
6114835471
commit
9005de6e8e
@ -931,7 +931,7 @@ impl framework::Example for GlobalState {
|
||||
let screen_size=glam::uvec2(config.width,config.height);
|
||||
|
||||
let camera=GraphicsCamera::new(screen_size,user_settings.calculate_fov(1.0,&screen_size).as_vec2());
|
||||
let camera_uniforms = camera.to_uniform_data(physics.output().adjust_mouse(&physics.next_mouse));
|
||||
let camera_uniforms = camera.to_uniform_data(physics.output().adjust_mouse(&physics::MouseState::default()));
|
||||
let camera_buf = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||
label: Some("Camera"),
|
||||
contents: bytemuck::cast_slice(&camera_uniforms),
|
||||
@ -1063,6 +1063,7 @@ impl framework::Example for GlobalState {
|
||||
self.graphics.clear();
|
||||
|
||||
let mut physics=physics::PhysicsState::default();
|
||||
//physics.spawn()
|
||||
physics.game.stage_id=0;
|
||||
physics.spawn_point=spawn_point;
|
||||
physics.process_instruction(instruction::TimedInstruction{
|
||||
|
@ -292,22 +292,22 @@ enum MoveState{
|
||||
|
||||
pub struct PhysicsState{
|
||||
pub time:Time,
|
||||
pub body:Body,
|
||||
pub world:WorldState,//currently there is only one state the world can be in
|
||||
body:Body,
|
||||
world:WorldState,//currently there is only one state the world can be in
|
||||
pub game:GameMechanicsState,
|
||||
pub style:StyleModifiers,
|
||||
style:StyleModifiers,
|
||||
touching:TouchingState,
|
||||
//camera must exist in state because wormholes modify the camera, also camera punch
|
||||
pub camera:PhysicsCamera,
|
||||
pub next_mouse:MouseState,//Where is the mouse headed next
|
||||
pub controls:u32,
|
||||
pub move_state:MoveState,
|
||||
camera:PhysicsCamera,
|
||||
next_mouse:MouseState,//Where is the mouse headed next
|
||||
controls:u32,
|
||||
move_state:MoveState,
|
||||
//all models
|
||||
pub models:Vec<ModelPhysics>,
|
||||
pub bvh:crate::bvh::BvhNode,
|
||||
models:Vec<ModelPhysics>,
|
||||
bvh:crate::bvh::BvhNode,
|
||||
|
||||
pub modes:Vec<crate::model::ModeDescription>,
|
||||
pub mode_from_mode_id:std::collections::HashMap::<u32,usize>,
|
||||
modes:Vec<crate::model::ModeDescription>,
|
||||
mode_from_mode_id:std::collections::HashMap::<u32,usize>,
|
||||
//the spawn point is where you spawn when you load into the map.
|
||||
//This is not the same as Reset which teleports you to Spawn0
|
||||
pub spawn_point:Planar64Vec3,
|
||||
|
Loading…
Reference in New Issue
Block a user