Skip to content

Commit 00167c1

Browse files
authored
fix issue #1533 (failed assertion in TestAnimMigration) (#1534)
* fix issue #1533 (failed assertion in TestAnimMigration) * ArmatureDebugAppState: restore deleted whitespace
1 parent 3469b47 commit 00167c1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureDebugAppState.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import com.jme3.input.controls.*;
4141
import com.jme3.light.DirectionalLight;
4242
import com.jme3.math.*;
43+
import com.jme3.renderer.Camera;
4344
import com.jme3.renderer.ViewPort;
4445
import com.jme3.scene.*;
4546

@@ -158,8 +159,11 @@ public void onAction(String name, boolean isPressed, float tpf) {
158159
Vector2f click2d = app.getInputManager().getCursorPosition();
159160
CollisionResults results = new CollisionResults();
160161

161-
Vector3f click3d = app.getCamera().getWorldCoordinates(new Vector2f(click2d.x, click2d.y), 0f, tmp);
162-
Vector3f dir = app.getCamera().getWorldCoordinates(new Vector2f(click2d.x, click2d.y), 1f, tmp2).subtractLocal(click3d);
162+
Camera camera = app.getCamera();
163+
Vector3f click3d = camera.getWorldCoordinates(click2d, 0f, tmp);
164+
Vector3f dir = camera.getWorldCoordinates(click2d, 1f, tmp2)
165+
.subtractLocal(click3d)
166+
.normalizeLocal();
163167
Ray ray = new Ray(click3d, dir);
164168
debugNode.collideWith(ray, results);
165169

0 commit comments

Comments
 (0)