mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -80,7 +80,7 @@ namespace Plugins.JNGame.Sync.Frame
|
||||
|
||||
public override Task OnInit()
|
||||
{
|
||||
Physics.autoSimulation = false;
|
||||
Physics.simulationMode = SimulationMode.Script;
|
||||
Physics.autoSyncTransforms = false;
|
||||
this.OnReset();
|
||||
return Task.CompletedTask;
|
||||
@@ -108,6 +108,8 @@ namespace Plugins.JNGame.Sync.Frame
|
||||
this._nLocalFrame = 0;
|
||||
this._nServerFrame = 0;
|
||||
this._nLocalRunFrame = 0;
|
||||
this.dtTotal = 0;
|
||||
this.dtInputTotal = 0;
|
||||
|
||||
Physics.SyncTransforms();
|
||||
EventDispatcher.Event.Dispatch(JNSyncFrameEvent.CREATE);
|
||||
@@ -174,9 +176,9 @@ namespace Plugins.JNGame.Sync.Frame
|
||||
}
|
||||
});
|
||||
|
||||
//执行下一帧物理
|
||||
Physics.Simulate((float)dt / 1000);
|
||||
Physics.SyncTransforms();
|
||||
// //执行下一帧物理
|
||||
// Physics.Simulate((float)dt / 1000);
|
||||
// Physics.SyncTransforms();
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user