예제 #1
0
파일: Client.cs 프로젝트: Adevien/Netcode
        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
        }
예제 #2
0
 public SimulationStep(PredictedState state, InputData input)
 {
     this.state = state;
     this.input = input;
 }