You are not logged in.

1

Saturday, January 22nd 2022, 7:57pm

Smooth motion when dragging

Hi all !
I'm trying to get a very smooth stop when I drag my mouse on flat panos. My code is :


<control
mouse="follow"
dragrelative="false"
draginertia="0.06"
dragfriction="0.989"
movetorelative="true"
movetoaccelerate="0.1"
movetospeed="1.1"
movetofriction="0.8"
zoomtocursor="true"
zoomoutcursor="false"
bouncinglimits="true"
bouncinglimits.mobile="true"/>

And I can't get a super smooth stop, can we use "tween" for this ?
You can see an example here, the motion when dragging is smooth, but not the end when it stops... I tried increasing dragfriction :

http://endetail.fr/mudaac/fillastre/


On this link you can see how smooth the motion is :

https://www.haltadefinizione.com/visuali…incent-van-gogh


thanks !! *smile*

2

Monday, January 24th 2022, 11:41am

Up please ! *g*

3

Monday, January 24th 2022, 12:17pm

Hi,

both examples appear 'smooth' to me...
Especially on the iPhone the krpano example appears noticeable more smoother and fluid, the other example appears slightly jerky there...

But I would say the friction is a bit too low in your example, the movement is going on too long...
Basically its a balance between inertia and friction, try playing especially with these two values.
And for the 'stopping' of the the movement at some point a smaller frictionstop value can be used.

E.g start with these values and then vary them slightly:

Source code

1
2
3
4
5
<control mode="follow"
         draginertia="0.05"
         dragfriction="0.95"
         frictionstop="0.001"
         />


Best regards,
Klaus

4

Monday, January 24th 2022, 12:30pm

Thanks Klaus, I'm trying this immediatly and will see. My main problem is the stopping that I find ultra progressive on the haltadefinizione example and slightly brutal on my example.

5

Monday, January 24th 2022, 12:36pm

Then especially reduce the frictionstop value (already done in my example code above)
https://krpano.com/docu/xml/#control.frictionstop

6

Monday, January 24th 2022, 1:48pm

Thank you Klaus, Now it's perfectly smooth ! Believe it or not, it's the only parameter I didn't see in the list, and now it seems so obvious...


http://endetail.fr/mudaac/fillastre/


updated and smoothed...


Do you think I should "clean" some part of my code (maybe some values in my code are useless, e.g movetospeed/movetorelative/dragrelative ?)