Completely stop pano rotation (rotation done with move force)?

  • Hi everybody,

    I got stuck again so I hope somebody can/will help me out.

    I am using the following movement mode for krpano (I found this in another thread):

    Code
    public function updateViewMoveForce(hLookAtForce:Number, vLookAtForce:Number):void {
     	_krpano.set("hlookat_moveforce", hLookAtForce);
     	_krpano.set("vlookat_moveforce", vLookAtForce);
    }


    Works nice. However there is one problem: Once a hotspot is clicked, I would like to completely stop the movement and make a "lookto". The lookto works fine but I am unable to stop the movement completely which results that after the lookto completes, the pano moves a bit still and gets out of the position. So once again the steps to reproduce this would be:
    1. put cursor to a position where you can move the pano -> pano begins to rotate/move
    2. if the cursor gets over a hotspot, click it (while pano still moving)
    3. that triggers a lookto, which works fine and indeed the pano "looks to" where it should
    4. ... but as it was moving before the lookto(), after the lookto it still moves a bit which brings it out of the position.

    This is my lookto function:

    Code
    public function lookTo(ath:Number, atv:Number):void {
         	  updateViewMoveForce(0, 0);
    	       	_krpano.call("stoplookto()");
      	     	_krpano.set("mylooktocallback", callback);
    	       	_krpano.call("lookto("+ath+", "+atv+", 70, smooth(180, -180, 360), true, true, mylooktocallback() )");
    	       	function callback() {
           	     	     	dispatchEvent(new Event(MOVE_COMPLETE));
     	     	}
    }


    Is there anything I can do to completely stop the rotation? Setting 0, 0 for the forces obviously does not make the trick as it just "tweens it out". Please note that before I call the lookTo the work forces are not updated on enter frame anymore so the only updateViewMoveForce() called is inside the lookTo() function. Thanks a lot!

  • Hi,

    currently it's not possible to stop that friction manually, but I think I will add something for this in the next release. Maybe a dedicated action for stopping or just stopping automatically on all lookto and stoplookto calls...

    Best regards,
    Klaus

Participate now!

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