- Home /
How To Send [Command] From Mouse Input Of The Local Player
Hi,
im Working On a 3D Multiplayer Card Game,each playerPrefab has a cam, the 52 cards Are spawned and has Network (Identities and Transform)and not set for server only or local player authority.
I want when a player click and Drag a card , i want the card to move on the server so that it will move on all clients as well im using OnMouseDown()OnMouseDrag()OnMouseUp() because im using sprites and not UI Please I really need your Help its been 2 days that im trying to solve this solution.
my problem is : when the server click and drag ,it moves on all the client .but if the client Drag it only move on the client.
I'm assu$$anonymous$$g since you've mentioned [Command] that you're trying to use this and it's not being received by the server? Can you include your script that has both the [Command] and the section of the script where you call the [Command] on the client side?
Also, where are the scripts that have the above functions attached to?
thank you man i fixed this problem after i wrote the post.
Answer by SoftAnswers · Sep 08, 2015 at 09:25 AM
I Forgot that [Command] runs only on LocalPLayer objects and the cards is for the server so i had to send message to the playerPrefab script and then he will do a [Command]
Hello! Could you share the code or show (maybe a video) how to make dragging and dropping objects on the server and client synchronously? Common objects for all players. I just need the same drag and drop and no one talks about it or shows it (Can you please help with this !? I can send you a project for example. Or I can buy a video tutorial from you. Help please!