Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.


Sonntag, 10. August 2014, 15:38

flat pano - rotate along Z axis


Is it possible to rotate PoV in flat panorama along Z axis? I have some high resolution macro images, where user would benefit in being able to rotate point of view along Z axis freely. Can it be done?


Sonntag, 10. August 2014, 19:52

Can it be done?

you mean area rotation??
definitely not ...

it could be done in flash but ... see also this

use hotspot-popups which could be dynamicaly rotate.



Sonntag, 10. August 2014, 21:07

I meant changing orientation of an image - just like rotating a map. Simplest things are trickiest to explain so here is visual aid:)

Canvas rotation would work just as good as point of view (camera) rotation I guess. To be honest I was certain this would be pretty simple. I did not understand much from the link provided - is it really not possible without resorting to flash programing?

Beiträge: 1 850

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden


Sonntag, 10. August 2014, 23:55



set(image.prealign,'0|0|<ROTATION VALUE IN DEGREES>');
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter ::


Donnerstag, 14. August 2014, 07:54

Or camera rotation
view Z rotation
prealign is works just for first load of image and you can't change this attribute at runtime just on load image.

Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread


Donnerstag, 14. August 2014, 10:35


just as note - changing the prealign setting dynamically is also possible, but a bit more complicated - tween any variable and use the 'update' callback to build and update the prealign setting - additionally the updateobject() and updatescreen() action need to be called for updating the results.

e.g. to rotate once around the z axis:


set(rz, 0);
tween(rz, 360, 10.0, linear, null, txtadd(image.prealign, '0|0|', get(rz)); updateobject(true); updatescreen(); );

Here as online example:…datescreen(););

Best regards,


Freitag, 15. August 2014, 18:29

Wow! didn't knew, nice to know, thanks!!

VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Sudarchikov Andrey« (16. März 2016, 03:31)


Sonntag, 31. August 2014, 19:50

Hello gyus,

Thank you for the tips, it is helping a lot. After some test I realized that actually rotating camera and rotating canvas is not the same. In my case I need to implement camera rotation. Canvas rotation is not working properly, as when image is zoomed in, it is not rotating along point of interest, but along the very center of image. So it seems that I should use camroll attribute. But I still have a problem with proper implementation. I would like have a button that will slowly rotate camera when it is pushed.
ondown="set(view.camroll,+1);" is not working that way. What am I doing wrong? I am not very fluent in krpano syntax yet, so probably I am making some silly mistake. I will appreciate any suggestions.



Sonntag, 31. August 2014, 21:30

ondown="tween(view.camroll,720,distance(720,3),linear);" - start rotation
onup="stoptween(view.camroll);" - stop rotation

Something like that

VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread


Montag, 1. September 2014, 12:26


another note - when changing the view.camroll setting, consider also setting the control.camrollreset setting to false to avoid that it will be set back to 0 on user panning.

Best regards,


Montag, 1. September 2014, 20:16

Thank you, works like charm.
Yes, I was scratching my head about this behavior:) Thanks!

Just one more thing. Is there any simple way to rotate dragging cursor frame of reference together with camera rotation? When I rotate camera 90 degrees, dragging image left-right moves it up-down. This is not very intuitive way of navigation for user:)

I guess it wouldn't happen if I used image.prealign, but in this case there would be a problem with center of rotation, which is fixed to the center of the image instead of point of interest.



Montag, 1. September 2014, 22:54

I'm not sure what you are trying to achieve, but implementing a custom flat rotation control mode can be very complex of course, you might need to remap the viewing rotation values to other coordinate systems, do the calculations there and then remap them back...

Maybe have a look at this plugin and the rotatevector() function there to get an idea about that:…ath/#attributes

Best regards,


Montag, 1. September 2014, 23:23

Looking at the example it seems it is able to do exactly what I need - after rotating image upside down with bottom slider, panning still works as it should - left is left, right is right. I'm afraid It might be too difficult to implement for newbie like me, but I will dig into documentation and try to make it work. More questions might be coming soon:)


Mittwoch, 3. September 2014, 22:10

Well, that was quick. Another question is coming. I am looking at the code of vectormath example. If I understand correctly, part of code responsible for remapping rotation values is inside "update_faces" action, correct?

<action name="update_faces">
plugin[vectormath].rotatevector(hotspot[pano_r].ath, hotspot[pano_r].atv, hotspot[pano_r].rotate,
get(hotspot[pano_f].ath), get(hotspot[pano_f].atv), get(hotspot[pano_f].rotate), 90,0,0);

I can see that cube faces are described with <hotspot> element instead of <image>. What is the reason for that? Another difficulty is due to fact that I need to translate this code to use it with multires flat pano instead of simple cubefaces. In online example it looks simple - recalling one of six faces, like hotspot[pano_r]. In multires pano I have only multiple <level> elements.

Could you try to clarify that a little bit for me?



Beiträge: 3 042

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden


Mittwoch, 3. September 2014, 23:11

Yes that is correct.( i think)

It is called hotspot element because that is what they are.

I think this is never going to work with multires.
To complicated and with the six cubefaces already quite heavy on the machine.
Look here for an old example.
Not sure if it still live.. On ipad now..
Tuur *thumbsup*