Sie sind nicht angemeldet.

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

1

Dienstag, 24. Mai 2011, 15:17

hlookatmin for pad

Can anyone tell me if ' limitview="range" hlookatmin="-80" hlookatmax="+90" ' should work on ipad?

I have the latest bugfixes and am able to restrict the view vertically but not horizontally.... I believe the code to be correct as it works fine on the desktop...
<view hlookat="0" vlookat="-20" fovtype="MFOV" fov="90" fovmin="75" fovmax="120"
limitview="range" vlookatmin="-90" vlookatmax="+60" hlookatmin="-80" hlookatmax="+90"/>

Can anyone help? I have foolishly (or not?) told the client that this horizontal restriction is possible as I have used vertical restrictions before and, logically, it never entered my head that horizontal would be any different.
My deadline is tomorrow!

If this line of code is not supported, does anyone have a work around?

As always, any comments are appreciated..... except those focusing on the 'foolishly' part of this thread! *cursing*

Kev

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

2

Dienstag, 24. Mai 2011, 15:24

Horizontal limit does not work on iPad.

Hans

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

3

Dienstag, 24. Mai 2011, 15:41

Thanks for your directness Hans.
I don't suppose you have any suggestions for a work around do you?

Kev

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

4

Dienstag, 24. Mai 2011, 15:48

You could make a very rude action to pan to a home position when looking in that direction or just black it all out.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

5

Dienstag, 24. Mai 2011, 16:30

<events onviewchange="stop();"/>

<action name="stop"
IF(view.hlookat GT 90, set(view.hlookat, 90));
IF(view.hlookat GT -90, set(view.hlookat, -90));
</action>

i think that might work but i have not tested it.

6

Dienstag, 24. Mai 2011, 16:49

this one works keeping viewing inside 0-90. could be changed to any number just make sure your starting view settings are in between your wanted restrictions.

<action name="stop">
IF(view.hlookat LT 0, set(view.hlookat, 0));
IF(view.hlookat GT 90, set(view.hlookat, 90));
</action>

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

7

Dienstag, 24. Mai 2011, 19:13

Cheers VN, I'll give that a try.... the client went nuts when I told him I couldn't restrict it!

Kev

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

8

Dienstag, 24. Mai 2011, 20:02

this one works keeping viewing inside 0-90. could be changed to any number just make sure your starting view settings are in between your wanted restrictions.

<action name="stop">
IF(view.hlookat LT 0, set(view.hlookat, 0));
IF(view.hlookat GT 90, set(view.hlookat, 90));
</action>


Tried it but it does not work on iPad at all.
I get some wrong restriction in Flash though.

Hans

9

Dienstag, 24. Mai 2011, 20:08

It worked on iPhone 4.

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

10

Dienstag, 24. Mai 2011, 20:12

It worked on iPhone 4.


Can you tell me exactly how you used it?

Diod you remove the other limits which work in flash.

How did you apply the action ?

Hans

11

Dienstag, 24. Mai 2011, 20:19

I actually left the other limits in place although they were set differently than my test. I simply copied the stop code from vn

<action name="stop">
IF(view.hlookat LT 0, set(view.hlookat, 0));
IF(view.hlookat GT 90, set(view.hlookat, 90));
</action>



and then found my events tag and added the

onviewchange="stop();" to that events tag.

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

12

Dienstag, 24. Mai 2011, 20:30

I seen it and it seems to work in a way.

But you put the events within scene 1 and it affects all scenes but in different ways depending on your initial view.

Have to try it again as this is exactly one of the ways I did it, except for the event was not within the scene tags.

Hans

13

Dienstag, 24. Mai 2011, 20:36

if you put it inside scene 1 it should only affect other scenes if you are using MERGE or KEEPVIEW or KEEPBASE. I tested it outside the scene tags however it was just a single pano so I could not speak for what Hans found.

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

14

Dienstag, 24. Mai 2011, 20:53

Got it working.
I do not have any scenes on this.
http://www.panoramas.dk/2010/queen-margrethe-birthday.html

The limits for the flash are +95 -95

To get the same with the action I used this.

<events onviewchange="stop();"/>

<action devices="html5" name="stop">
IF(view.hlookat LT -40, set(view.hlookat, -40));
IF(view.hlookat GT 40, set(view.hlookat, 40));
</action>


Hans

15

Dienstag, 24. Mai 2011, 21:14

Didn't even think about it affecting EVERY scene. I will get back to the drawing board and limit it to each scene in my test.

Still, this was a great idea, VN2011.

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

16

Dienstag, 24. Mai 2011, 22:13

To any of you who are interested, regarding the 'affecting all scenes' issue. Here's a work around:

I put <events onviewchange="stop();"/> within the scene of the restricted tour then created another action

<action name="cancelstop">
IF(view.hlookat LT -360, set(view.hlookat, -360));
IF(view.hlookat GT 360, set(view.hlookat, 360));
</action>

and within the next scene added <events onviewchange="cancelstop();"/>

This work for me on the desktop and ipad with no problems.

Thanks again VN... quick response has saved my a*s. *thumbsup*

Kev

17

Mittwoch, 25. Mai 2011, 05:08

glad this worked. ive been saved a few times in these forums dealing with last minute tweaks. kev just so you know another way to cancel the limits would be to just set the event onviewchange to empty quotes <events onviewchange=""/> then there would be no need to duplicate the action with he 360 rotation set. the empty event would overwrite the limits. basically doing the same thing with less code.

18

Mittwoch, 25. Mai 2011, 10:41

I posted this just a few days ago, which does the exact same thing in just one line.:
<events onviewchange="set(view.hlookat,0)"/>
Still good to see that others are trying to find a workaround too *thumbup*

But like I said in the other thread, this solution is far too slow and laggy for iDevices. The view-tag gets set new for every moved pixel, what means: 100 pixels movement per sec = 100 times reading and writing the view-tag. Your code, VN2011, is even a little slower, because of the fact that the action also needs to be calculated 100 times/s.

I tried to use the mouse.x/mouse.y-tags instead, but it´s just as slow. And searching the forum I found out that it´s possible to lock the mousewheel, but I found no way to lock the mouse.x-movement inside XML and JS is no solution for me :(

Keep brainstorming, guys! There has to be a solution *smile*
Best regards,
Nupsi

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

19

Mittwoch, 25. Mai 2011, 12:50

another way to cancel the limits would be to just set the event onviewchange to empty quotes <events onviewchange=""/>
glad this worked. ive been saved a few times in these forums dealing with last minute tweaks. kev just so you know another way to cancel the limits would be to just set the event onviewchange to empty quotes <events onviewchange=""/> then there would be no need to duplicate the action with he 360 rotation set. the empty event would overwrite the limits. basically doing the same thing with less code.
I will definitely give both of these suggestions a try... as soon as I've rectified my sleep deficit which is the result of this latest project! *sleeping* Although I'm a bit dubious about empty events for the idevices as, in the past, I've discovered the this can cause issues.

Kev

20

Mittwoch, 25. Mai 2011, 14:53

empty events for the idevices


i didnt think of that. i know empty urls break idevices so this might as well.