Announcement

Collapse
No announcement yet.

Hide actor for player at listen server only?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hide actor for player at listen server only?

    Hi!

    How can I hide an actor for an arbitrary number of players/clients including the player at the listen server? The problem is that the "hidden" value is replicated from the server so e.g. if only the player at the listen server shouldn't see the actor, no one can see it since its replicated down to the clients.

    It seems like this functionality is totally missing unless the hidden property is related to the current owner or I'm I wrong? Is the only way of solving this to modify the AActors source code? I can think of many games that could need this behavior e.g. a MOBA.

    Thanks in advance!
    Last edited by undercover; 05-26-2015, 11:20 AM.

    #2
    Would this help you?

    Code:
    UFUNCTION(BlueprintCallable, Category="Rendering")
    void SetOnlyOwnerSee
    (
        bool bNewOnlyOwnerSee
    )

    https://docs.unrealengine.com/latest...See/index.html
    Pocket Sized Animations

    Comment


      #3
      Unfortunately the actor can't have any specific owner in my case. It must be able to be hidden to any combination of players connected, otherwise that could have worked.

      EDIT:
      I have now edited the question to make it less ambiguous.

      Thanks anyway!
      Last edited by undercover; 05-22-2015, 10:36 AM.

      Comment


        #4
        This is kind of old, but I ran across this problem and wanted to provide an answer for those who come looking.

        Instead of using `SetActorHiddenInGame()` I just did `GetCapsuleComponent()->SetVisibility(!bIsHidden, true)`.

        Comment

        Working...
        X