Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the option PAN

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I'm verry stuck with the following problem:
I have a QTVR movie an several hotspots. Once clicked on that hotspot, it swings to the center of the view.
The option SWING will not wait until it is finished before continuing to the next assignment. In every help I found, it was discribed that it could be checked with the PAN option. But I can't seem to find a way to call it in the right form.

I've used several options, but it wouln't work:
pan (p_currentSprite)
pan Sprite(p_currentSprite)
p_currentSprite.pan
and so on.
Can anyone give me an example or the right syntax to use this option??

Thanks,
PoGo :)
 
Update:
I've managed to fix the loop and adressing de pan option, but it just woun't stop!
It's beginning to get irritating :)

Explained things:

p_currentSprite = the VR movie
varpan = a variable for the pan degrees
pan = the degrees (0 - 360) in an QTVR movie where the user van look at.

The Source:

repeat while the pan of Sprite(p_currentSprite) <> varpan then
swing(sprite p_currentSprite,varpan,0,33,5)
varpan = the pan of Sprite(p_currentSprite)
alert &quot;Pan of sprite during loop... &quot; & the pan of Sprite(p_currentSprite)
end repeat
alert &quot;this messsage should appear after loop&quot;

*** end source

The problem is that the last message is being shown while the swing option is active. And that's not the intention....

How to deal with this stupid problem... :)

Thanks ahead,
PoGo
 
ok, got it.

when you set varpan = the pan of Sprite(p_currentSprite) you instantly make the repeat condition true hence the repeat is exited and the alert shown.

try commenting out the varpan = line, now it should just keep on spinning till it gets to what you set varpan too in the first place.

try something like this

swing(sprite p_currentSprite, varpan,0,33,5)
-- i am thinking the swing command will smoothly turn it over time
repeat while the pan of Sprite(p_currentSprite) <> varpan
alert &quot;alert message&quot;
-- i would use put or your going to get lots of alerts
-- you may need an updatestage in here too, but probably not
end repeat
alert &quot;new alert message&quot;


this code (if my ideas of swing are correct) will start the rotation and then keep putting the message up till the pan reaches varpan, at that time it will break out and show the new alert.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top