Compare commits
1 Commits
surf-bodge
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
ddc315365c
|
@@ -122,10 +122,11 @@ fn press_w(){
|
||||
instruction:strafesnet_common::physics::Instruction::SetControl(strafesnet_common::physics::SetControlInstruction::SetMoveForward(true)),
|
||||
});
|
||||
// wait 10 ms
|
||||
const SAMPLE_TIME:strafesnet_common::physics::Time=Time::from_millis(10);
|
||||
PhysicsContext::run_input_instruction(&mut physics,&physics_data,strafesnet_common::instruction::TimedInstruction{
|
||||
time:Time::from_millis(10),
|
||||
time:SAMPLE_TIME,
|
||||
instruction:strafesnet_common::physics::Instruction::Idle,
|
||||
});
|
||||
// observe current velocity
|
||||
assert_eq!(physics.body().velocity,vec3::raw_xyz(0,-1<<32,-0x2b3333333));
|
||||
assert_eq!(physics.camera_trajectory(&physics_data).extrapolated_velocity(SAMPLE_TIME),vec3::raw_xyz(0,-1<<32,-0x2b3333333));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user