Interactive 360 panoramas camera script

Hi
I am trying to get interactive panorama camera navigation working. If you look say, at this Quicktime panorama (-- that I did, of an amazing mirror installation by Japanese artist Yayoi Kusama)
http://www.mediavr.com/infinityroom2.htm
you can see that it is different from standard mouse look. The idea is that you can click anywhere in the panorama (skybox) and depending how far and the direction you drag before you let the mouse up the panorama pans left or right or up or down at a speed and direction proportional to how far and in what direction you have dragged (this is standard interactive 360 panorama navigation). When I was scripting such things in Lingo for Director this is the script I used (you can see it constrains vertical tilting too)

"on mouseDown me

set startV = the mouseV
set startH = the mouseH

repeat while the mouseDown
mypan = member(“newBox”).cameraRotation[2]
mytilt = member(“newBox”).cameraRotation1
myroll = member(“newBox”).cameraRotation[3]

set tDX = -(the mouseH - startH) / 1800.0
set tDY = -(the mouseV - startV) / 1800.0

mypan =mypan + tDX

mytilt = mytilt + tDY
if mytilt >90 then
set startV= the MouseV
set tDY = -(the mouseV - startV) / 300.0
if tDY > 0 then
set tDY = 0
end if
end if

if mytilt <-90 then
set startV= the MouseV
set tDY = -(the mouseV - startV) / 300.0
if tDY < 0 then
set tDY = 0
end if
end if

member(“newBox”).cameraRotation = vector(mytilt, mypan, 0)

end "

thanks!

Take a look at the MouseLook script, it’s basically that. You’d add mouse-down detection and speed based on mouse position (or relative to where mouse went down)