Answer the question
In order to leave comments, you need to log in
Why does the position of an object look exactly like this?
if(Gdx.input.isTouched()) {
Vector3 touchPos = new Vector3();
touchPos.set(Gdx.input.getX(), Gdx.input.getY(), 0);
camera.unproject(touchPos);
bucket.x = touchPos.x - 64 / 2; ----------------------------- here is this line why 64/2
}
In the explanation it is written (the position of the bucket is changed so that the center is in touch/mouse coordinates.)
Please explain why?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question