public void DefineCamera(string cameraName, string host, CVARC.V2.RobotCameraSettings settings) { return; //var cam = new GameObject(cameraName).AddComponent<Camera>(); //var robot = GameObject.Find(host); //cam.transform.parent = robot.transform; //var camPos = settings.Location; //var camRot = settings.ViewAngle; //cam.transform.localPosition = new Vector3((float)camPos.X, (float)camPos.Z / 20, (float)camPos.Y); // ??????? //cam.transform.localRotation = Quaternion.Euler(-(float)camPos.Pitch.Grad, 90 + (float)camPos.Yaw.Grad, (float)camPos.Roll.Grad); //cam.fieldOfView = (float)camRot.Grad; //if (robot.GetComponent<Renderer>().material.color == Color.green) // cam.rect = new Rect(0, 0.7f, 0.3f, 0.3f); //else // cam.rect = new Rect(0.7f, 0.7f, 0.3f, 0.3f); }
private void UpdateAllBodies(CVARC.Core.Body root) { //TODO. fix after new bodies. //TODO. get rid of copypaste. /* foreach (var body in root.Nested) { if (body is PhysicalPrimitiveBody) { var primBody = body as PhysicalPrimitiveBody; //System.Diagnostics.Debug.WriteLine(primBody.Location + " " + primBody.Name); primBody.UpdateLocation(); //System.Diagnostics.Debug.WriteLine(primBody.Location + " " + primBody.Name); } else UpdateAllBodies(body); // } }*/ }
public void Initialize(CVARC.V2.IWorld world) { }
public override ISceneSettings ParseSettings(CVARC.Network.HelloPackage helloPackage) { return SceneSettings.GetRandomMap(helloPackage.MapSeed); }