Openframeworks: ofEasyCam Release Inertia/Velocity

Created on 28 Mar 2016  路  11Comments  路  Source: openframeworks/openFrameworks

ofEasyCam on iOS reacts very sensitive when you release the finger (aka touch-up), essentially spinning the camera wildly around at times.

The easiest way to handle this would be to add extra functionality to ofEasyCam along the lines of disableReleaseInertia() / enableReleaseInertia() with the default behaviour to what it is now.

I'd file a PR for this, but wanted to open this up for discussion first.

All 11 comments

@roymacdonald do you have any thoughts on this as you've been working with ofEasyCam lately ...

@bakercp the enable/disable Inertia methods are already implemented. Inertia is always added on mouse/touch release. Also there is setDrag(float) which lets you set how much drag or friction the inertia has. 1 = never stop; 0= no inertia. by default it is 0.9
Maybe renaming this function so it reflects that it is related to inertia.

BTW, I think it is safe to close this issue

Thanks!

It seems dragging only a few pixels can set the camera spinning "Salyut 7 style".
Maybe it considers absolute pixels and retina screens have more pixel density.
It would be great to be able to configure camera initial velocity per pixels dragged.

Hi @dimitre what happens if you lower the drag, usingsetDrag(...)? also, you can lower the rotation sensitivity using setRotationSensitivity(...).
can you paste a video about this behavior?
Are you seeing this behavior on iOS or on a computer?

Yes, video is here, I'm seeing this on a computer
http://dmtr.org/easycam/
setDrag seems to have no difference, even setDrag(0)
things are better with setRotationSensitivity, thanks.

thanks @dimitre
that's really odd. I have not seen that behavior. The fast rotation starts when you release the mouse button or when you stop dragging the mouse?

@dimitre I double checked and now I see it. Inertia is disabled by default and I never activate it.
I'll see whats going on.
thanks for pointing this out

mouse release. it seems to have a 10x impulse no matter which setRotationSensitivity is set.
not such a problem if I lower it but feels unnatural.
thanks @roymacdonald

Ok. so I found the issue. It is because the original implementation used the incremental rotation and the new uses absolute rotation, but the values for the intertia were not properly updated. I already did a cheap and dirty fix which works but it is quite ugly so I am looking to get a nicer fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dimitre picture dimitre  路  4Comments

glungtung picture glungtung  路  9Comments

ofTheo picture ofTheo  路  8Comments

dimitre picture dimitre  路  4Comments

ofTheo picture ofTheo  路  6Comments