void FixedUpdate() { // synchronize the model with the current time fmu.DoStep(Time.time, Time.deltaTime); // get the variable "h" (height) transform.position = Vector3.up * (float)fmu.GetReal("h"); }
private void FixedUpdate() { setCoord(); //Synchronize the model with the current time fmu.DoStep(Time.time, Time.deltaTime); //Read FMU outputs of position xdir = (float)fmu.GetReal("xgps"); ydir = (float)fmu.GetReal("ygps"); zdir = (float)fmu.GetReal("zgps"); //Assign gps values to the new transform of object transform.position = new Vector3(xdir, ydir, zdir); }