________________________________________

VRHOTWIRES
OBJECT In PANO TOOL


________________________________________





version 2.0
















Object Movies in panos.

------------------------------------
This is a something people asked for back in vrscript days 2 years ago.
Now we can have it.



Note that the ‘Done’ button does nothing in this tool...

Unlike the other two backbuffer tools you don’t have to start with a ‘screen’ sprite.

This is because the spinning nature of the video can make it susceptible to showing the sprite. So in this tool, the sprite is automatically made from a posterframe image of your video track. This way it’s a bit larger file, but you’ll only see the first frame of your video if the sprite shows up...







Looking at the script....

On Idle Sprite 1
//variable 4444 is true if the mouse has entered the sprite
// now we have to figure out exactly how far from the edge we are in the sprite and go to the right frame in the video based on that distance.
Variable[4011] holds the current horizontal location of the sprite, so if we subtract that from the current mouse position we’ll be left with a small number that represents how far we are into our sprite.

Now the 5940 is the duration of the video track.

If Variable[4444]=1
If (abs((theMouseLocalHLoc-Variable[4011])*49))<5940
MovieGoToTime abs((theMouseLocalHLoc-Variable[4011])*49)
EndIf
EndIf


//everything below here is just a standard pano animation script
SpriteTrackSetVariable 4013 theQTVRPanAngle+679.456
SpriteTrackSetVariable 4014 Variable[4013]div360
SpriteTrackSetVariable 4014 (Variable[4013]-(360*Variable[4014]))-180
SpriteTrackSetVariable 4011 500*(0.5+(0.66*(Variable[4014]/theQTVRFieldOfView)))
SpriteTrackSetVariable 4012 300*(0.5+((theQTVRTiltAngle-22.7157)/theQTVRFieldOfView))
SpriteTrackSetVariable 4006 60.2031/theQTVRFieldOfView
SpriteSetMatrix 1 0 0 0 1 0 0 0 1 SpriteIndex=1
SpriteScale Variable[4006] Variable[4006] SpriteIndex=1
SpriteTranslate Variable[4011] Variable[4012] true

end

On MouseEnter Sprite 1

MovieSetRate 0
SpriteTrackSetVariable 4444 1

end

On MouseExit Sprite 1

SpriteTrackSetVariable 4444 0

end

###########
Node Number: 1
###########