I’m baffeled on this one…
I have my clients sending there input to the server through RPC commands.
The axis are sent and processed normally.
Jump gets sent as a boolean.
When the server receives the boolean it will trigger the jump in the Update function.
The boolean allways arrives on the server but at high frame rates the jump is allmost never executed in the Update function. I’m guessing this has to do with it being a boolean but not sure how i can resolve this.
Any ideas ?
what do you use to get your player back on the ground? it might be this way because you did not scale the “gravity force” with Time.deltaTime or smt, it jumps but it gets very fast back on the ground. (if it’s in Update and uses frame-rate dependent code)
and make sure the boolean given to the server, changes it’s value after initializing jump sequence.
moveDirection.y -= gravity * Time.deltaTime;
it allways changes the server side boolean in the RPC function, it just doesn’t make it to the Update function.
so when i debug the boolean in the Update function, it rarely changes at high frame rates.
i don’t think the gravity is the issue here.
it works ok on lower frame rates.
I managed to create a small fix for it but it’s not the best solution i think…
I created a coroutine that will change the boolean after 25 ms and send an RPC with the false value.
So the boolean is true for a longer amount on the server and now it gets executed even at high frame rate.