From 48f28974f9a9fc1f4d2afc507a2374bf4c689d95 Mon Sep 17 00:00:00 2001 From: Matthew Universe Date: Sat, 23 Nov 2019 13:43:00 -0500 Subject: [PATCH] Closes #1210 Quaternion.lookAt now has a return value (#1223) --- jme3-core/src/main/java/com/jme3/math/Quaternion.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/math/Quaternion.java b/jme3-core/src/main/java/com/jme3/math/Quaternion.java index 0a5b818b6..1ce5a1c0d 100644 --- a/jme3-core/src/main/java/com/jme3/math/Quaternion.java +++ b/jme3-core/src/main/java/com/jme3/math/Quaternion.java @@ -1371,13 +1371,14 @@ public final class Quaternion implements Savable, Cloneable, java.io.Serializabl * a vector indicating the local up direction. * (typically {0, 1, 0} in jME.) */ - public void lookAt(Vector3f direction, Vector3f up) { + public Quaternion lookAt(Vector3f direction, Vector3f up) { TempVars vars = TempVars.get(); vars.vect3.set(direction).normalizeLocal(); vars.vect1.set(up).crossLocal(direction).normalizeLocal(); vars.vect2.set(direction).crossLocal(vars.vect1).normalizeLocal(); fromAxes(vars.vect1, vars.vect2, vars.vect3); vars.release(); + return this; } public void write(JmeExporter e) throws IOException {