Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion jme3-core/src/main/java/com/jme3/math/Quaternion.java
Original file line number Diff line number Diff line change
Expand Up @@ -1371,13 +1371,14 @@ public void writeExternal(ObjectOutput out) throws IOException {
* 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 {
Expand Down