Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void render()
- {
- GL11 gl = Gdx.gl11;
- float centerX = (float)(MathUtils.cosDeg(yaw));
- float centerY = 0;
- float centerZ = (float)(MathUtils.sinDeg(yaw));
- System.out.println(centerX+" "+centerY+" "+centerZ+" ~ "+GDXRacing.camera.position.x+" "+GDXRacing.camera.position.y+" "+GDXRacing.camera.position.z);
- Gdx.glu.gluLookAt(gl, GDXRacing.camera.position.x, GDXRacing.camera.position.y, GDXRacing.camera.position.z, GDXRacing.camera.position.x+centerX, GDXRacing.camera.position.y+centerY, GDXRacing.camera.position.z+centerZ, 0, 1, 0);
- if(Gdx.input.isKeyPressed(Keys.A))
- {
- yaw++;
- }
- if(Gdx.input.isKeyPressed(Keys.D))
- {
- yaw--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment