From 72ffe5ed7630d1b0b5bb42cbb14433f959382570 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Thu, 2 Mar 2023 00:57:23 -0800 Subject: [PATCH] solve issue #1975: TestAttachDriver doesn't reset properly (#1976) --- .../src/main/java/jme3test/bullet/TestAttachDriver.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java b/jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java index 32bb9c2402..8c1c712603 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java +++ b/jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java @@ -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 @@ -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); } } }