Forums > Jitter

Joystick modifying camera lookat with respect to camera position

Dec 23 2009 | 6:07 pm

hi, i’ve got a logitech joystick spitting out polar x and theta

what i want to do is lock the camera lookat position into a sphere with radius 1 around the camera position where x y z = lookat coordinates and h j k = camera position coordinates such that

(x-h)^2 + (y-j)^2 + (z-k)^2 = 1

then add to the lookat position using the x and theta of the joystick but all the while have the values locked into the sphere around the position so that no matter the position i can rotate the camera view with the joystick

any ideas on how to accomplish this equation? i don’t know how to patch an equation relationship using expr.

Dec 23 2009 | 6:37 pm

you probably want to use quaternions for this.
this library will help:

Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Jitter