You are not logged in.

panowerk

Beginner

  • "panowerk" started this thread

Posts: 12

Location: Freiburg, Germany

Occupation: Designer, photographer

  • Send private message

1

Monday, November 5th 2012, 1:31pm

Having a layer follow a hotspot.

Hello all,

I would like to have a layer follow a hotspot's position on screen. I'm using a parent system and the layer tracks the hotspot fairly well but, since I have the layer alignment values in pixels, the position of the layer changes in relation to the background when viewed on different sized screens.

When the layer position looks good on my laptop (1440 x 900 screen size) it is not correct when I look at it on my iMac (2560 x 1440 screen size) or vice versa.

I'm thinking that I need to use screentosphere (or spheretoscreen?) but my coding skill are not that great.

I have to get the hotspots x/y position relative to the screen and then apply them to the layer using, I'm guessing, onviewchange.

If anyone can point me to an existing thread that explains it in terms that I might be able to understand (I've searched but haven't had any success finding what I need), or help me out with some instruction, it would be greatly appreciated.

Thanks in advance,

Roger

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Monday, November 5th 2012, 3:45pm

Try ox and oy to position the plugin from the hotspot. This works for me.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

panowerk

Beginner

  • "panowerk" started this thread

Posts: 12

Location: Freiburg, Germany

Occupation: Designer, photographer

  • Send private message

3

Monday, November 5th 2012, 4:26pm

Thanks for the quick reply.

I'm not sure what you mean with trying ox and oy. They are just offset x and y positions. Since the layer is parented to the hotspot, (ox & oy) and (x & y) are basically the same thing. Or am I wrong about this?

I'd like to break the parent/child relationship and determine the x/y position dynamically so that no matter the size of the screen, the layer doesn't move in relation to the spot in the image that it's describing.

I hope this makes sense and thanks again for your help.

Roger

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Monday, November 5th 2012, 7:03pm

Do you have a link? my layers are fixed in an offset position to the hotspot..
I don't see what you mean. Did you try ox and oy?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour