Draggable polygonal hotspots

  • Hello. Can anybody give me advise on how to make polygonal hotspots draggable? I tried this code for regular hotspots and it's works fine, but it's not useful for polygonal hotspots.

    I need similar solution, but for polygonal hotspots and WITHOUT usage of editor plugin.

  • Hi!

    I've played a bit, see here:

    http://vt-vr.most-inform.com/poly_move/

    The hotspot consists of five points, the modified "draghotspot" action is this:

    As you see, the code is static, "ath_diff" and "atv_diff" are differences between the original and new ath and atv values of the "zero" spot (the first spot of the polygon, in fact). Then this difference is applied to all points. What is left to do is write some dynamic code which will count number of spots via "hotspot[...].point.count" value and apply the difference to all spots automatically. *tongue*

    Regards,

    Alexey

  • Here we go. The updated version of "draghotspot" for polygons. As far as I've tested, it counts all the points and applies the ath and atv changes properly.

    Here it is:


    Hope this helps *tongue*

    Regards,

    Alexey

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!