Another request :)

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Another request :)

Post 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
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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;
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post 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
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post 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 ;)
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post 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 ...
Post Reply