2

atan2 expects the Y parameter first. See this SO question for answers as to why the Y parameter is passed in first.


1

Why have we arrived at the convention that rotations should be counter-clockwise then, even in engines where positive y is down? Have we? Let us try CSS: const box = document.getElementById("box"); function step(timestamp) { let deg = timestamp/10; box.style.transform = "rotate(" + deg + "deg)"; window.requestAnimationFrame(step); } ...


1

This is my solution, Google Earth like control with smooth animation (or not), when zoomed in it is user friendly and slows panning down. The only thing I am not satisfied about is the quaternion slerp, at these defaults there won't be any sudden jumps but I would have loved to understand how to sub-interpolate quaternions so it works even when rotating ...


1

Turns out the solution to the fundamental problem is to avoid the complicated math and just use an appropriately-configured HingeJoint. When a player grabs an object, set node A to a kinematic body child node of that controller, and set node B to the object being grabbed. Set both paths to empty strings when they let go. The actual result is a little wonky, ...


Only top voted, non community-wiki answers of a minimum length are eligible