public void Update() { unsafe { if (_listener == null || _listener.NativePtr == null) { return; } } if (!_listener.IsReady()) { return; } try { int zflip = (ZFlipped) ? -1 : 1; // added FreeSL.fslSetListenerPosition(_listener.CameraLastRealPosition.Value.x, _listener.CameraLastRealPosition.Value.y, _listener.CameraLastRealPosition.Value.z); Mogre.Vector3 yVec, zVec; yVec = _listener.CameraLastRealOrientation.Value.YAxis; zVec = _listener.CameraLastRealOrientation.Value.ZAxis * zflip;// change FreeSL.fslSetListenerOrientation(zVec.x, zVec.y, zVec.z, yVec.x, yVec.y, yVec.z); } catch (Exception exception) { // Console.WriteLine("AAAA " + exception.Message + " " + exception.InnerException + " " + exception.Source); } }
public void Update() { FreeSL.fslSetListenerPosition(_renderable.Position.x, _renderable.Position.y, _renderable.Position.z); Mogre.Vector3 yVec, zVec; yVec = _renderable.Orientation.YAxis; zVec = _renderable.Orientation.ZAxis; FreeSL.fslSetListenerOrientation(zVec.x, zVec.y, zVec.z, yVec.x, yVec.y, yVec.z); }