Esempio n. 1
0
  @Override
  protected void onUpdate(float deltaTime) {
    _time += deltaTime;

    float x = (float) (8 * Math.cos(_time));
    float y = (float) (8 * Math.sin(_time));
    float z = (float) (8 * Math.cos(_time * 0.7f));
    _currentCamera.setPosition(x, z, y);
    _currentCamera.setDirection(-x, -z, -y);
  }
  public HelloWorldGameInfo() throws Exception {
    _gameScene = new Scene();

    /* _gameScene.init(_domeSize, R.raw.skydome1, R.raw.skydome2,
    R.raw.skydome3, R.raw.skydome4, R.raw.skydome5, R.raw.skydome6);  */

    Engine.getSharedInstance().pushScene(_gameScene);

    _currentCamera = new Camera();
    _currentCamera.setValues(new Vector3(0.0f, 0.0f, -8.0f), 1.5f, 4.0f / 3.0f, 1.f, 1100.f);

    _currentCamera.setViewportSize(
        Engine.getSharedInstance().getViewWidth(), Engine.getSharedInstance().getViewHeight());

    Engine.getSharedInstance().setCurrentCamera(_currentCamera);
    Engine.getSharedInstance().getRenderService().setClearColor(new Vector4(0.0f, 0.0f, 0.3f, 0.f));
  }