follow mouse on object vr + stop at the end

  • Hello,

    This is actually to know if these client requests are possible... than I'll try to find the solutions (or have your help to get there :) ).


    1) I'm working on a new project and the client asked me to create a follow mouse when opening an object VR.

    I'm seeking for the follow mouse function, but there's no example out there with object vr. Is it possible?

    2) I'd also like to know if I can make a stop action when reaching the last image (moving right) and first image (moving left).

    3) When hitting a button to load a "next scene", can I make a play on the sequential images till a certain point?
    Ex:
    If there are 30 images on the sequence.

    onclick="make sequence till image 15; loadscene...."

    Best Regards and thanks for the help!

    Daniel

  • Hi,

    e.g. you could try to make the default rotate left/right images 'larger' and invisible (alpha=0) and call the rotation start/stop actions in the onover/onout events instead of the ondown/onup events. Then the object will rotate 'automatically' when hovering these areas.

    Best regards,
    Klaus

  • That's awesome Klaus!!

    It's not a "follow mouse", but it's pretty near what the client wants.

    There's only one problem:

    The code that I used to make the rotation stop at the first frame when moving left and stop at the last frame when moving right don't work any more (it was for the "mdown" action.

    How can I make the rotation stop with this "onover" rotation suggestion?

    Thanks,

    Daniel

  • I got the stop at end working.

    Here's what I did (for 16 frames):


    Code
    <action name="rotateleft">		dec(image.frame,1,1,1);		delayedcall(0.04, if(rotateing,rotateleft()) );	</action>
    	<action name="rotateright">		inc(image.frame,1,get(image.frames),16);		delayedcall(0.04, if(rotateing,rotateright()) );	</action>

    It's working when I open the html generated by the makeobject at krpano tools.

    When I open the xml with the exactly the same structure inside that video presentation, the "mouse follow" doesn't work.
    Any idea?
    I'm almost there :)

    There's only the resize (100% width and height) problem and this mousefollow control to complete all client requests. Though work! :)

    Many many many thanks!!

    Daniel

  • Hi Klaus,

    The solution was rejected by the client.

    He needs the follow mouse function.

    I created several of those default images across the screen in the same number of frames.

    The problem is that I can't put to work the onover="set(image.frame, 1)"

    Here's the plugin code:

    Code
    <plugin name="frame1" url="%SWFPATH%/skin/black.png" align="center" x="-6.66%" width="6.66%" height="100%" alpha="1" zorder="3" onover="set(image.frame,1);"  />

    It looks right, but doesn't work. Nothing happens on mouse over.

    Thanks for your help!!

    Daniel

  • Hi,

    I made some tests and can see that it works if I load it from the html generated by the "make object" from krpano tools.

    When it's in the middle of the tour, it won't function. I can load the object vr, but the "set(image.frame, X)" doesn't work.

    Any idea of what's going on?

    Best regards,

    Daniel

Participate now!

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