Announcement

Collapse
No announcement yet.

Change auto receive input based on player

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

    Change auto receive input based on player

    Hi everyone!


    I am working on an VR application for architectural purposes where clients can change wall colors, flooring etc using a virtual tablet.

    Right now I am working on implementing multi-user support. In my game mode I am spawning the VR pawns using the OnPostLogin event. I am using one Quest as a listen server and an other to join the session, which all works great. The pawns are being replicated properly on both client and server side.

    The only issue I have at the moment is that the motion controllers which are being spawned by the Pawn with "Auto Receive Input" set to "Player 0" by default. So on the client side I can't access the inputs for that actor.

    Is there a way to change that "Auto Receive Input" value via blueprint based on the owner that spawned it?

    Or can I access the assigned player controller name generated by the "OnPostLogin" event inside my pawn? If so, I was thinking of duplicating the motion controller actor and set the "Auto Receive Input" to Player 1 and spawn them based on the player controller name using a switch on string.

    I hope what I am trying to say makes sense. I've added some screenshots to clarify.


    Thanks in advance!

    Danny


    P.S. The motion controller and pawn are based on the Epic VR template

    Attached Files

    #2
    Ok so I've managed to spawn a duplicate by casting the "New player name" variable to the VR Pawn and use the switch on string to spawn the dupilcate for the client and the original for the actor for the host.

    This however doesn't solve the issue since the VR Pawn is targeting the original motion controller actor

    So I think I should revisit the first option and try to change the input based on the owning player.

    Comment


      #3
      Solved this by creating a player controller class that spawns the pawn instead of spawning the pawn in the game mode.

      The client's right motion controller is attached to the left motion controller somehow however, but I'll look in to that next week.

      Comment

      Working...
      X