I’ve been trying to move a sphere relative to the arcRotateCamera’s direction and I just can’t get it to go in the right direction. I’m sure that I’m messing up the angles somehow and I would really appreciate it if somebody could point out what exactly it is that I’m doing wrong.
@gbz, yes! this is exactly what I was looking for. Could you please explain how you calculated the rotation axis though? That is the only part that has me a bit confused
Calculated it through trial and error. Knew this angle had to depend on 2 variables:
ArcRotateCamera’s alpha
Angle based on whether W, A, S, or D is pressed
so added both to line of code above. Through trial and error, saw that there was a “negative” dependence on the ArcRotateCamera’s alpha. Then I just added a couple factors of Math.PI through guessing until it worked