protected virtual void OnZoomChanged(OrientPosEventArgs e) { if (ZoomChanged != null) { ZoomChanged(this, e); } }
protected virtual void OnPositionChanged(OrientPosEventArgs e) { if (PositionChanged != null) { PositionChanged(this, e); } }
public void ZoomChanged(object sender, OrientPosEventArgs e) { if (e.Pitch == 0) { lastFovy = e.Pitch; } float sensitivity = 0.2f; float angle = e.Pitch - lastFovy; float tmpFovy = fovy + angle * sensitivity; if (tmpFovy > 1 && tmpFovy < 179) { fovy = tmpFovy; _scene.UpdateFovy(tmpFovy); } lastFovy = e.Pitch; }
public void PositionChanged(object sender, OrientPosEventArgs e) { _gameObject.Transform.Translate(e.Pitch, e.Roll); }