I want to disable networkobject(player) when get out of Aoi(Area Of Interest)

ARR
ARR
edited July 2022 in Fusion

I'm using a fusion Aoi right now.

However, there was a problem. The player appears to be stopped when the player is out of range. I want to hide the player's mesh so that the player can't be seen. What should I do?


The problem seems to be that if two players are close and far away, the other players stop still. Not even in that position. So I want to make sure that when a player comes into or out of the range, if there is a callback or something like that, if it goes out of the range or comes out of the range to make it's visible.


player doesn't know if the opponent player is standing there or out of the range of interest, so that's the problem now.

Best Answer

  • emotitron
    emotitron ✭✭✭
    Answer ✓

    Yes, typically you will want to have your own handling for visibility that operates on a smaller radius than the Area Of Interest. Area Of Interest doesn't have visibility handling. It just controls when the server does and doesn't cull NetworkObject updates to a client.

    IOnEnterSimulation and IOnExitSimulation can be used for simulation related handling (such as disabling colliders), but it should not be relied on for interpolated cosmetics and such.

    AOI being simulation related, it is not meant to be directly used for visible fog of war, or visibility in general. You will want to in this case fade objects in and out based on a radius that is smaller than the AOI... so objects fade in/out BEFORE they enter and exit the simulation.

Answers

  • I found a way

    Calculate before it stop simulation and make it disappear

  • emotitron
    emotitron ✭✭✭
    Answer ✓

    Yes, typically you will want to have your own handling for visibility that operates on a smaller radius than the Area Of Interest. Area Of Interest doesn't have visibility handling. It just controls when the server does and doesn't cull NetworkObject updates to a client.

    IOnEnterSimulation and IOnExitSimulation can be used for simulation related handling (such as disabling colliders), but it should not be relied on for interpolated cosmetics and such.

    AOI being simulation related, it is not meant to be directly used for visible fog of war, or visibility in general. You will want to in this case fade objects in and out based on a radius that is smaller than the AOI... so objects fade in/out BEFORE they enter and exit the simulation.

This discussion has been closed.