Announcement

Collapse
No announcement yet.

Issue with possession and setting VR hand owner

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

    Issue with possession and setting VR hand owner

    Hello, so I am making a multiplayer Titanfall inspired VR game where you can control the pilot as well as the mech. Now both the pilot pawn and the mech pawn have VR hands that I need to take control of in order to work properly, but I am currently running into an issue.

    My issue is that I need to take ownership of the VR hands in order for the controls to work properly and for the VR hands to track properly with the controllers. However, the only way I've been able to figure out that sets the ownership properly is by running an event on tick in the Player Controller(which is bad for performance), but what I want to be able to do is do the setup only once when the Player Controller possesses the pilot or mech.

    Idk what it is that I am missing so if anyone can tell me or how I can debug this thing it would be much appreciated!

    Edit: This issue seems to only occur on the client, on the server side it seems the setup is working correctly

    Click image for larger version  Name:	PossessProblem.JPG Views:	0 Size:	199.2 KB ID:	1854197

    #2
    I ended up figuring this one out. Apparently I just needed an RPC from the Event on Possess and multicast it to the client's Player Controller.

    I read that possession happens on the server so I assumed the Event on Possess would get called on the client only to find out I was completely wrong. In fact the Event on Possess does not execute, I tested with print strings to find that out. After making the RPCs it worked as expected

    Click image for larger version

Name:	Fix1.JPG
Views:	10
Size:	178.5 KB
ID:	1854542

    Click image for larger version

Name:	Fix2.JPG
Views:	18
Size:	90.6 KB
ID:	1854541

    Comment

    Working...
    X