void SimulatePhysics(float fixedDeltaTime) { //Debug.LogError("Simulating on head node"); //should only be run on head UniCAVEInputSystem.SimulatePhysics(fixedDeltaTime); //wait for children to simulate before simulating on head again UniCAVEInputSystem.PhysicsState = UniCAVEInputSystem.PhysicsStates.WaitingForChildSimulate; }
void RpcSimulatePhysics(float fixedDeltaTime) { Debug.LogError("Child is simulating"); //should only be run on children UniCAVEInputSystem.SimulatePhysics(fixedDeltaTime); //wait for head to simulate before simulating again UniCAVEInputSystem.PhysicsState = UniCAVEInputSystem.PhysicsStates.WaitingForHeadSimulate; //tell head this child has simulated //commands can only be run from the player object Player.CmdChildHasSimulated(UniCAVE.Util.GetMachineName()); Debug.LogError($"Child sent command (hasAuthority: {hasAuthority}, localPlayer: {isLocalPlayer})"); }