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