enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] CVS update and mouse controls


From: Jeremy Sawicki
Subject: Re: [Enigma-devel] CVS update and mouse controls
Date: Thu, 09 Jan 2003 02:43:52 -0500

At 02:23 PM 1/6/03 +0100, Daniel Heck wrote:
>I tried it. Frankly: it feels horrible :-) I'm not sure how to describe
>it... maybe "unbalanced" is the right word.  Either the marble
>accelerates too much, even when you move the mouse only slightly, or it
>doesn't move at all.

I don't understand -- you mean it feels horrible with my patch?  The patch
wasn't intended to affect the behavior at all.  It was only meant to affect
how you set the options to get a given behavior.  Suppose you are using
these settings without the patch:

Mouse speed   : m
Mouse damping : d
Friction      : f

You can achieve _exactly_ the same behavior using these settings with the patch:

Mouse speed   : m*(25/d)
Mouse damping : d
Friction      : f

(This ignores the fact that the UI expects an integer mouse speed.)

You can verify this just by examining the code.  In the mouse_force
function, the mouse move vector is multiplied by options::MouseSpeed and
then passed to world::SetMouseForce, which in turn passes it to add_force.
So if you multiply your mouse speed setting by a factor of 25/d, you will
exactly compensate for the factor of d/25 that my patch introduces in
add_force, and get identical behavior.

The motivation for the patch comes from the following observation.  Suppose
you calculate the total change in momentum that results from a mouse move
vector X (without my patch).  The vector X*m will be passed into add_force,
so taking damping into consideration, the total change in momentum can be
approximated by the integral of X*m*e^(-d*t) from t = 0 to infinity, which
is equal to X*m/d.

So you can see that multiplying the mouse speed setting by a given amount or
dividing the damping by a given amount will have a similar impact on the
mouse sensitivity.  Changing the damping also has other effects (which are
more subtle in my opinion).  The patch was intended to decouple the two
settings, so that if you want to change the mouse sensitivity you are
required to do it with the mouse speed setting and not with the damping
setting.  (With the patch, the total change in momentum becomes X*m/25 -- it
no longer depends on the damping.)  The way things are now, I think it is
easy to get confused about the effects of the two settings.

I hope I have explained myself better this time.  :-)

Jeremy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]