コード例 #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
ファイル: SimulationStep.cs プロジェクト: Adevien/Netcode
 public SimulationStep(PredictedState state, InputData input)
 {
     this.state = state;
     this.input = input;
 }