Rotate at a frame time dependent rate (300 degrees / second)
This commit is contained in:
parent
3d9b62d455
commit
83113f3afd
@ -31,11 +31,11 @@ public class PlayerInputSystem extends EntitySystem {
|
||||
AccelerationComponent accelComponent = entity.getComponent(AccelerationComponent.class);
|
||||
|
||||
if (Gdx.input.isKeyPressed(Input.Keys.D)) {
|
||||
positionComponent.rotation = Utils.rotate(positionComponent.rotation, -5);
|
||||
positionComponent.rotation = Utils.rotate(positionComponent.rotation, -300 * dt);
|
||||
}
|
||||
|
||||
if (Gdx.input.isKeyPressed(Input.Keys.A)) {
|
||||
positionComponent.rotation = Utils.rotate(positionComponent.rotation, 5);
|
||||
positionComponent.rotation = Utils.rotate(positionComponent.rotation, 300 * dt);
|
||||
}
|
||||
|
||||
Vector2 acceleration = accelComponent.acceleration;
|
||||
|
Loading…
Reference in New Issue
Block a user