Page 1 of 1
Another request :)
Posted: Sat May 24, 2008 12:26 pm
by turshija
I noticed that when using MouseModelControler, Model movement is smooth ...
is there any possibility to add an option to disable that in MouseModelControler component ?
Thanks
Boris
Posted: Sun May 25, 2008 6:32 pm
by VilleK
The easiest way to achieve instant mouse movement is to use a expression like this:
CurrentModel.Position.X=App.MousePosition.X;
CurrentModel.Position.Y=App.MousePosition.Y;
Posted: Mon May 26, 2008 4:27 am
by turshija
thats useful, but not in my project ...
If I use that for model positioning, then the Model doesn't have velocity right ?
And I really need velocity because I'm full of new ideas that are waiting to be "exposed" as soon as CenterMouse gets implemented...

I think that smooth movement in MouseModelController will make big troubles to me ...
Cheers
Boris
Posted: Mon May 26, 2008 6:33 am
by kattle87
Well, in physics you learn that speed = space/time, So, what if you get two variables (or four variables) like "Old_X" and "Old_Y" then you set (CurrentModel.Velocity.X = (CurrentModel.Position.X - Old_X)/App.Time) in the OnUpdate component? That should do the trick, at least until the smoothness of the component get implemented as a variable and not as a constant

Posted: Mon May 26, 2008 10:42 am
by turshija
well I know that, but to avoid complications with unnecessary things, there is feature requests ...

I think this is not hard to implement, and it saves much time ...