PUN Drag & Drop Pickup Inventory

Options
First off, I'm very new to Photon and MP coding in general, so I'm making this up as I go along.

I'm hoping someone can give me some general advice on approach/design pattern.

I have a scene in which I spawn players. Within the scene there are item managers that spawn items on start up using InstantiateSceneObject. All the players can see the items. All good.

I use Easy Touch asset to making hooking up interaction events nice and simple. Example of an item in the screenshot.

The problem is, the click, drag, etc events only fire right now for the master client, though there is ONE item in the scene that other players can also interact with (for some unknown reason), but let's just ignore that for a sec.

I've seen a lot of examples (some included with PUN) of pickups that the player just runs into, firing an OnCollision, which then easily passes the player and their PhotonView, etc. In my case though, players will drag and drop the items they see into their inventory. Here's a video of how it works for the master client - http://www.stevejarman.com/temp/photon1.mp4

Anyway, I'm rambling a bit, but I'm basically trying to get some hints on how to approach those OnSimpleTap, OnDragStart, OnDragEnd implementations, to make them "MP aware".


Comments