vx
,
vy
に速度(1フレームあたりのピクセル数)を直接設定する
extends BodyActor; shape="circle"; while(true) { if (getkey("left")) vx=-3; if (getkey("right")) vx=3; update(); }
extends BodyActor; shape="circle"; while(true) { if (getkey("left")) applyForce(-10,0); if (getkey("right")) applyForce(10,0); update(); }