How to fix choppy/laggy drag and drop?
thumbfrenzylabz
Member, PRO Posts: 50
Hello my fellow salad tossers! hehehe
Um. So, I'm having trouble with implementing smooth dragging in my game.
When I click and drag on the actor, it moves very jerky/choppy/laggy to my mouse location. It seems to only move to my mouse location when I stop moving my mouse. If I move my mouse fast, it doesn't move until I stop moving the mouse.
Here is my rules for the dragging. The actor has a bool attribute named "dragging" as described by @tshirtbooth
Yes, I have also used constrain attribute to the touch.position.x and touch.position.y rather than mouse.position.x and .y.
I cannot figure out why it is so jerky when I try to drag and drop the actor. I have searched for several hours for a solution with no luck... please help!
Ta!
Brandon
Um. So, I'm having trouble with implementing smooth dragging in my game.
When I click and drag on the actor, it moves very jerky/choppy/laggy to my mouse location. It seems to only move to my mouse location when I stop moving my mouse. If I move my mouse fast, it doesn't move until I stop moving the mouse.
Here is my rules for the dragging. The actor has a bool attribute named "dragging" as described by @tshirtbooth
Yes, I have also used constrain attribute to the touch.position.x and touch.position.y rather than mouse.position.x and .y.
I cannot figure out why it is so jerky when I try to drag and drop the actor. I have searched for several hours for a solution with no luck... please help!
Ta!
Brandon
Comments
Touch is inside
Do
constrain att..
Self.positionX to game.Touches.Touch 1.X
constrain another attribute
self.positionY to game.Touches.Touch 1.Y
It should work
Thanks!
Sincerely,
DarkUndeadSpawn.
I've recoded my dragging using your example @ericzingeler. It works just as well as @tshirtbooth 's method....
It turns out that if I remove the particle effects from my game, the lagging jerky drag goes away.... so the particles are causing the game to lag....
solutions? I'll try to read through the forums for ways to make the particle effects more efficient and cause less game lag.
.B.