cryptomaxC
Normal2y ago
31 replies
cryptomax

Manually syncing position, rotation at 20hz?

If I were manually syncing an object position and rotation, should the model setter just be setting every frame or can resources be saved by setting it only 20x a second becuase thats what normcore would use anyway? It woudnlt' be in sync with normcores refresh anyway i'd assume so how does that work? Is there a way to sync at normcores refresh rate?
Solution
protected override void OnRealtimeModelReplaced(YourModel previousModel, YourModel currentModel) {
    model.onWillWrite += OnModelWillWrite;
}

private void OnModelWillWrite(YourModel model) {
    //Do whatever code here
}
Was this page helpful?