Is it possible to make two computers engage in a video call (across a network)?
I’m working on a project to design a virtual campus (Where players/students can design their avatars, attend lectures, talk with friends,… etc). A part of it is where a professor can do a realtime online video streaming - resembling a lecture, another is where two students can chat with each other via video call.
So, my question is: Is this possible? And if it is, can you give my any guidelines on what to do/learn?
I’ve already applied some tutorials on how to make a basic MMO, and on capturing video from a webcam & displaying it on a game object. But I can’t seem to merge them together.
Your help is much appreciated
EDIT: 8 March. I’ve managed to write a script to transfer the data from the webcam over the network. It gives a blank page on the receiver’s end, but it’s something
#pragma strict
var webcamTexture : WebCamTexture;
var data : Color32[];
function OnServerInitialized() {
webcamTexture = WebCamTexture();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
data = new Color32[webcamTexture.width * webcamTexture.height];
}
function Update () {
webcamTexture.GetPixels32 (data);
}
function OnConnectedToServer() {
networkView.RPC ("WebcamStream", RPCMode.Others, data, webcamTexture);
webcamTexture.Play();
}
@RPC
function WebcamStream (data : Color32 [], webcamTexture: WebCamTexture) {
var newwebcamTexture: WebCamTexture = webcamTexture;
renderer.material.mainTexture = newwebcamTexture;
var newdata: Color32[] = data;
webcamTexture.GetPixels32 (newdata);
}