Mirror Multiplayer

Hi,
I'm creating the Mirror integration for Ucc, and I could need some help.

I managed to integrate the client-server topology for the Abilities but I have a rotation problem when I move the Local Player, it walks forward when I press Up but when I press Right or Left it rotates on itself, like in the Resident Evil first edition.

Could someone help me to understand the rotation system of the Player?
 
I haven't used Mirror so I probably won't be able to help much but from the remote client's perspective you should not be running the UCC update loop. Instead you should sync the transform using your own code. This is what I do with the PUN add-on and it works well.
 
Yes but to set up the client server topology I put the Input on the local player and the rest on the server.

In Combat mode it works, aiming too, but in Adventure mode it doesn't work properly.

I just need to know the way and where to ask for the rotation Input I'm looking for but I can't find it...

[TargetRpc]
public void TargetGetDeltaYawRotation(NetworkConnection target, float horizontalMovement, float forwardMovement)
{
var lookVector = m_PlayerInput.GetLookVector(true);
CmdGetDeltaYawRotation(horizontalMovement, forwardMovement, m_CharacterLocomotion.ActiveMovementType.GetDeltaYawRotation(horizontalMovement, forwardMovement, lookVector.x, lookVector.y));
}

[Command]
public void CmdGetDeltaYawRotation(float horizontalMovement, float forwardMovement, float deltaYawRotation)
{
KinematicObjectManager.SetCharacterDeltaYawRotation(m_CharacterLocomotion.KinematicObjectIndex, deltaYawRotation);
m_CharacterLocomotion.Move(horizontalMovement, forwardMovement, deltaYawRotation);
}

The KinematicObjectManager is only on server.
 
For full server authority.
I'm going to start from the beginning, because the host move doesn't work properly anymore, I must have made a mistake somewhere lol
 
Hi,
I have made a lot of progress and I would like to create the official Mirror Addon in full server authority based on PUN addon and I know pretty much all the modifications to do in your code base. And I know when add kill cam integration.

Who can I contact?
Thanks.
 
Last edited:
Awesome!

Let me know when you are close to releasing. As long as you don't include any of the character controller or PUN add-on source code you are good to go :)
 
It would be better if I base on PUN to include a single player mode with the multiplayer mode, and it will surely be more professional.
That's why I wanted to work with you, everyone could find his interest, because if I do it on my side you will not earn money...
What do you think about it?

ps: it's harder for me to start from scratch using PUN but the result will be better.
 
Last edited:
I will integrate a local client authority topology for cooperative host modes and full server authority for competitive modes:

public class MirrorNetworkInfo : NetworkBehaviour, INetworkInfo
{
[Tooltip("Set true for competitive modes and false for cooperative host modes to increase host performance, for example.")]
[SerializeField] protected bool m_IsServerAuthoritative = true;

[...]

public bool HasAuthority()
{
return (m_IsServerAuthoritative && isServer) || (!m_IsServerAuthoritative && isLocalPlayer);
}
}
 
Client-side prediction and Server reconciliation is difficult to implement keeping 1st and 3rd perspective. Looking forward to this.

I am forced to integrate Client-side prediction and Server reconciliation?
I will try to integrate it, we will see, as you say.
On the other hand the change of perspective is delicate, using the camera in Full Server Authority...
 
Last edited:
Concerning Single Player and Local Player Authority for Host Mode it is not possible without changing a lot of things! So it will be only Full Server Authority, sorry I went a bit too far...
And since I don't have the authorization from Opsive to use PUN I won't be able to publish this integration, sorry again for those who are desperately waiting for this integration!

By the way @Justin , your Dirty Flag system is great, a few years ago when I was a beginner I didn't understand the concept lol but it works well with Mirror ?
 
Last edited:
Hi, Apologies for the bother, I just wanted to check if you ever got your integration to work for Mirror and if you would be able to share it perhaps?

Please any help on the matter would be immensely appreciated as there doesnt seem to be any decent, fully featured player controllers that support Mirror :(
 
Yes, please! I know there would probably be licensing issues when selling it, however I would be happy to pay for your services getting the controller I already bought to run on mirror.
 
Yes, please! I know there would probably be licensing issues when selling it, however I would be happy to pay for your services getting the controller I already bought to run on mirror.
I second that, would be happy to pay you for this server authority addon for UCC @PesadeloDoEspantalho. Otherwise might need to switch to a different controller or write one from scratch at some point. Mirror is much better than PUN in my opinion. Opsive should absolutely write their official addon for it as soon as possible, especially that there's growing competition. Mirror is a free system you can find it on github, probably by far the best one at this point.
Only other thing that is as important is to develop an UCC ECS DOTS, performant system. Old Unity monobehaviours will be really a thing of the past, incomparable performance.
 
Top