Skip to content

Commit

Permalink
solve issue #1975: TestAttachDriver doesn't reset properly
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Mar 1, 2023
1 parent 7854851 commit 499fbb1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2021 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -291,7 +291,9 @@ public void onAction(String binding, boolean value, float tpf) {
vehicle.setAngularVelocity(Vector3f.ZERO);
vehicle.resetSuspension();
bridge.setPhysicsLocation(new Vector3f(0,1.4f,4));
bridge.setPhysicsRotation(Quaternion.DIRECTION_Z.toRotationMatrix());
bridge.setPhysicsRotation(Matrix3f.IDENTITY);
bridge.setLinearVelocity(Vector3f.ZERO);
bridge.setAngularVelocity(Vector3f.ZERO);
}
}
}
Expand Down

0 comments on commit 499fbb1

Please sign in to comment.