【发布时间】:2016-07-07 06:34:52
【问题描述】:
我正在尝试围绕其中心旋转 TextureRegion,但是每当我尝试旋转它时,旋转点要么是 Texture Region 的底角,要么是屏幕的远处。 这是我的对象类中的更新方法(纹理区域将模拟此对象的运动。
public void update(float delta) {
if (velocity.x < 0) {
rotation -= 50*delta;
if (rotation > 25) {
rotation = 25;
}
}
if (velocity.x > 0){
rotation += 50*delta;
if (rotation > 25) {
rotation = 25;
}
}
}
我在这里调用draw 方法将纹理区域显示在屏幕上
batcher.draw(AssetLoader.saum, sam.getX(), (gameHeight - (gameHeight / 3)), -(sam.getWidth()), (gameHeight - (gameHeight / 3)), -(sam.getWidth()), -(sam.getWidth()), 1, 1, sam.getRotation());
【问题讨论】: