This commit is contained in:
parent
ce5b7e69d1
commit
eda35769c0
1 changed files with 11 additions and 2 deletions
|
|
@ -122,8 +122,17 @@ public class SpaceGame extends SimplePhysicsGame {
|
||||||
|
|
||||||
public void performAction( InputActionEvent evt ) {
|
public void performAction( InputActionEvent evt ) {
|
||||||
rotation = dynamicNode.getLocalRotation().getRotationColumn(2);
|
rotation = dynamicNode.getLocalRotation().getRotationColumn(2);
|
||||||
appliedForce.set(rotation.mult(force)).multLocal( evt.getTime() );
|
switch(direction){
|
||||||
dynamicNode.addForce(appliedForce);
|
case 1:
|
||||||
|
case 2:
|
||||||
|
appliedForce.set(rotation.mult(force)).multLocal( evt.getTime() );
|
||||||
|
dynamicNode.addForce(appliedForce);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue