-1
안녕하세요 저는 LibGDX 초보자입니다. 저는 움직이는 카메라가 있고 카메라가 움직이는 동안 점수를 표시하고 싶습니다. 나는 이것을했지만 텍스트 (점수)는 카메라가 움직일 때 흔들린다. 이 문제를 해결하는 방법을 모르겠습니다. 내 코드는 다음과 같습니다.카메라로 BitmapFont 이동 LibGDX
public void render(SpriteBatch sb) {
sb.setProjectionMatrix(cam.combined);
sb.begin();
String s = Integer.toString(SCORE);
String h = Integer.toString(highscore);
sb.draw(bg,cam.position.x - (cam.viewportWidth /2),0);
sb.draw(groud,groundpos1.x,groundpos1.y);
sb.draw(groud,groundpos2.x,groundpos2.y);
font.draw(sb,s,cam.position.x-font.getSpaceWidth(),cam.position.y+(cam.viewportHeight /2)-39);
high.draw(sb,h,cam.position.x- (cam.viewportWidth /2),cam.position.y+(cam.viewportHeight /2)-39);
sb.end();
}