[Fishnet] 2D Trigger Detection Issues

In fishnet (4.3.5R) I am working with different ways to do server authoritative collisions (specifically triggers) in my 2D top down game. While trying to implement my previously offline OnTriggerEnter2D, I have run into a few issues. One which I believe is possibly intended and the other which I think is a bug.

The difference I noticed with the 2D trigger detection (confirming for OnEnter) is that while offline unity events would trigger if either of the colliders were triggers, the NetworkTrigger2D events only trigger when the object itself is a trigger and disregards if the other collider is a trigger. I have not tested if all collision events work like this and this may very well just be part of conserving network usage.

The other issue which I believe is a bug is that the Network Trigger 2D OnEnter (did not test other or Collision2D) when using the TilemapCollider2D Unity component does not ever register the event, but does register the offline version.

There are definitely work arounds I’ll do for both but figured I should post incase maybe I missed some documentation about usage, or since fgg is active here.

A little snippet (gameObject has Tilemap Collider 2D and Network Trigger 2D components)

private void Awake()
{
    _networkTrigger = GetComponent<NetworkTrigger2D>();
    _networkTrigger.OnEnter += NetworkTriggerEnter2D;
}

private NetworkTrigger2D _networkTrigger;

private void NetworkTriggerEnter2D(Collider2D collision)
{
    Debug.Log("Barrier Networked");
}

private void OnTriggerEnter2D(Collider2D collision)
{
    Debug.Log("Barrier Client");
}

Disclaimer: I am new to using Fishnet and game networking overall

Update: The network trigger 2d event shows up as a collision on the object with the collider not marked as a trigger, rather than a trigger in normal unity (confirmed for all 3 events- OnEnter, OnStay, OnExit)

The Tilemap Collider 2D does not register any network collision/trigger 2D events

I also found an additional bug where box collider 2D is networked at half the width/length (1/4th the area I believe). This can be worked around with the “additional size” on the scripts.

Has anyone else used fishnet for 2D? I know there was a more recent prediction V2 update which I assume is where these problems were introduced, and don’t know if there are similar issues on 3D if it is more focused on that.

Just a bit frustrating running into issues with the package itself and me thinking it’s something I am doing wrong since I’ve never done game networking :sweat_smile: Otherwise good experiences with fishnet

Hey! Not sure about the Tilemap not working with collision overlaps, this could be a Unity limitation but I’ll look into that to be sure.

The half size might have been an oversight for the 2D tests. If you have a sample project please file a bug report and this will be resolved quickly.

See: Creating Bug Reports | Fish-Net: Networking Evolved