Quantcast
Viewing all articles
Browse latest Browse all 16796

Unity 5.1 Networking - Spawn an object as a child for the host and all clients

I have a player object who can equip multiple weapons. When a weapon is equipped, its transform's parent is set to its hand. I have messed around with this for some time and cannot get this to work for both the host and the client. Right now I am trying to equip the weapon on the server, and tell all the clients to set their parents transforms.

In the update I am updating the weapons transform

public NetworkInstanceId weaponNetId;

[Command]
void Cmd_EquipWeapon()
{
var...​

Unity 5.1 Networking - Spawn an object as a child for the host and all clients

Viewing all articles
Browse latest Browse all 16796


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>