#Warning

16 messages · Page 1 of 1 (latest)

neat arrow
#

What line of code is that pointing to? (or script)

#

Are you using network transform?
I think ive seen this before

lyric yoke
#

Also what version of Mirror, in case this is something we've recently fixed?

neat arrow
#

Your collisions might need the
[ServerCallback]
or isServer checks inside them?
if only server is meant to run, otherwise client might be calling rpc

#

And, unless Mr G jumps in with any ideas
Could you temp remove the network transform on that object?
Do the same scenario again, see if that messages appears, just a gut feeling. @bronze citrus
Remember to undo after, and make sure all the settings are back to how they were before

#

As expected, i guess it narrows it down now 🙂

#

@bronze citrus Are you assigning and removing authority to this object, for players to control?

#

Okay so, i think NT attempts to move once, after auth was removed, thus giving this warning

#

Ive experienced it before

#

We might be able to replicate with mirror/examples/tank theft auto
Sounds similar

lyric yoke
#

There's not really anything we can do about this...it's a timing / race condition. Mirror sends an EntityStateMessage from client for every object the client thinks it owns everytime the PlayerLoop cycles. You're getting the warning because that msg is "in flight" when you're removing authority for the cart. When you remove authority, Mirror sends a ChangeOwnerMessage msg to that client, which updates its hashset of objects it owns, so it doesn't send the EntityStateMessage for that object anymore. Basically the two messages are passing each other in the air. That you're running messages through a relay makes it more likely to happen because there's a larger window of "flight time". You can safely ignore it.

#

Disabling the NT and stopping the movement of the cart before calling CmdRequestExitCart might help, but you'll need to re-enable the NT in an override of OnStopAuthority on the cart. This would suspend the NT from generating updates while you're "in the process" of exiting the cart.

#

For the "bailing out of a moving cart" case, when they click whatever to exit, start a coroutine on client that ...

  • Disables inputs so they can't drive the thing anymore
  • Brings the cart to a graceful stop if it's moving
  • Disables the NetworkTransform component
  • Calls the CmdRequestExitCart
  • Re-enables the NetworkTransform component in OnStopAuthority override on the cart
    ...in that order.
#

I haven't seen the game, so I don't know what "graceful stop" might entail, especially if they can jump / fly / tumble, etc.

lyric yoke
#

it's working for the host by exploiting the fact the host client lives on the server. It's the server that can move it. Correct, if they don't own it, they can't move it. If you're wanting physics simulation where clients can push anything and each other around, you need a real physics solution for that, with CSP, rollback, replay, correction, etc.

#

Quantum does that well, but last I checked, it's limited to 64CCU, costs at least $500/mo to license, and they had to invent their own physics engine to make it work.