// Send transform to all other users public void DoSend() { EsObject data = new EsObject(); data.setString(PluginTags.ACTION, PluginTags.POSITION_UPDATE_REQUEST); // set the X, Y coords that AS3 clients will see, which are integers and just vert, horiz. // only needed if there are AS3 clients in the same room //data.setInteger(PluginTags.TARGET_X, getAS3positionX()); // uncomment if AS3 clients will be in the room //data.setInteger(PluginTags.TARGET_Y, getAS3positionY()); // uncomment if AS3 clients will be in the room // set the position and rotation coords that Unity clients will use data.setFloat(PluginTags.POSITION_X, this.position.x); data.setFloat(PluginTags.POSITION_Y, this.position.y); data.setFloat(PluginTags.POSITION_Z, this.position.z); data.setFloat(PluginTags.ROTATION_X, this.rotation.x); data.setFloat(PluginTags.ROTATION_Y, this.rotation.y); data.setFloat(PluginTags.ROTATION_Z, this.rotation.z); data.setFloat(PluginTags.ROTATION_W, this.rotation.w); //Debug.Log("NetworkTransform.DoSend"); NetworkController nc = getNetworkController(); if (nc != null) { nc.sendToPlugin(data); } else { Debug.Log("DoSend can't send because controller is null"); } }