Hi community,
i made a spaceship that moves like that:
but if i stop pressing "W" it comes instantly to a stop. how can i make it to get slower after releasing the button?
right now it looks unnatural.
thanks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | private void Bewegen() { if (Greenfoot.isKeyDown( "a" )) { turn(- 4 ); } if (Greenfoot.isKeyDown( "d" )) { turn( 4 ); } if (Greenfoot.isKeyDown( "w" )) { move(- 5 ); } } |