void SimulateTick(ref SimulationStep step) { m_GetPlayer.HandlePlayer(step.input); m_ClientSimulation.Simulate(Constants.SNAPSHOT_INTERVAL); step.state.Set(m_GetPlayer.transform.position, m_GetPlayer.transform.rotation, m_GetPlayer.Yaw, m_GetPlayer.Pitch); _previous = _current; _current = new PredictedState(m_GetPlayer.transform.position, m_GetPlayer.transform.rotation, m_GetPlayer.Yaw, m_GetPlayer.Pitch); //todo rebuild a simulation with a simple controller + camera to try the code }
public SimulationStep(PredictedState state, InputData input) { this.state = state; this.input = input; }