How to fix choppy/laggy drag and drop?

Hello my fellow salad tossers! :D 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

dragging help

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! :D

Ta!
Brandon

Comments

  • ericzingelerericzingeler Member Posts: 334
    edited July 2013
    Here's an example project on the basics of dragging actors.
  • DarkUndeadSpawnDarkUndeadSpawn Member Posts: 64
    I did this very easy. Just click on the actor.

    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.
  • thumbfrenzylabzthumbfrenzylabz Member, PRO Posts: 50
    Thanks @ericzingeler and @DarkUndeadSpawn for your responses.

    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.
Sign In or Register to comment.