Skip to content

Commit

Permalink
solve issue #1975: TestAttachDriver doesn't reset properly (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold authored and Ali-RS committed Mar 2, 2023
1 parent d8951e8 commit c8a9199
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 c8a9199

Please sign in to comment.