Skip to content

Commit

Permalink
Fix Physics, ez-pz
Browse files Browse the repository at this point in the history
  • Loading branch information
MeFisto94 committed Jan 3, 2019
1 parent 86b00f9 commit f562ad1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Expand Up @@ -280,7 +280,7 @@ public void update( SimTime time ) {
b.getControlDriver().update(time, b);
}

pSpace.update(t);
pSpace.update(1/60f, 0);
pSpace.distributeEvents();

for( EntityPhysicsObject o : mobs.getArray() ) {
Expand Down
Expand Up @@ -60,8 +60,8 @@ public class CharInputDriver implements ControlDriver {
private float[] angles = new float[3];

private float upThreshold = 0.7f; // ~45 degrees
protected static final float walkSpeed = 5;
protected static final float runSpeed = 10;
protected static final float walkSpeed = 15;
protected static final float runSpeed = 30;

// Input
Quaternion rotation;
Expand Down
Expand Up @@ -69,7 +69,7 @@ public static EntityId createCharacter(EntityId parent, EntityData ed ) {
EntityId result = ed.createEntity();
Name name = ed.getComponent(parent, Name.class);
ed.setComponent(result, name);
ed.setComponents(result, ObjectTypes.playerType(ed), new Mass(50f), new SpawnPosition(20f, 2f, -16f),
ed.setComponents(result, ObjectTypes.playerType(ed), new Mass(50f), new SpawnPosition(29.5f, 20f, -30.4f),
ShapeInfos.playerInfo(ed));
ed.setComponents(result, new HealthComponent(100), new ArmorComponent(0));
return result;
Expand Down
Expand Up @@ -261,10 +261,6 @@ public void update( float tpf ) {

thrust.normalizeLocal();
session.move(rot, thrust, flags);
/* So that they are gone next frame. In theory we should always get release events, but you never know
* what might happen.
*/
flags.clearFlags();

// Only update the position/speed display 20 times a second
//if( spatial != null ) {
Expand Down

0 comments on commit f562ad1

Please sign in to comment.