Dragged Actor move/jump on release

hotMagichotMagic Member, PRO Posts: 266
edited March 2012 in Working with GS (Mac)
We are at the point in our game where we are fixing the detail, so this might not sound like much but it's annoying. We have an actor you drag and position, and it needs to have accuracy. It works well, but on releasing your drag, the character moves a slight bit, just enough to sometimes confound the aim by a degree or so. I've seen a couple similar posts but nothing exactly like this.

I think it's because as the finger is raised, it is actually accurately reading that the position reads a little different as parts of the finger are still on the screen as your finger This is because it does NOT happen on the mac or mac simulator with a mouse.

How have people dealt with this? We have a couple ideas but none of them seem great. THANKS!

Comments

  • robert.mccarthyrobert.mccarthy Member Posts: 165
    When you drag your actor, do you just constrain the X/Y of the mouse to your finger (so it snaps to the centre), or are you able to drag the actor from any part of it?
  • MotherHooseMotherHoose Member Posts: 2,456
    in my testing this also happens in Desktop with mouse … just not as noticeable
    make displayText actor to show touch1.X and touch1.Y
    and put a displayText on playerActor self.Position.X and self.Position.Y

    IMO it isn't the finger/mouse that is the problem it is the truncating of the real values at the end of the drag

    I fiddled around with some precision functions in expressionEditor … constraining two gameAttributes touchX and touchY

    then added to the drag-ableActor
    Rule: when
    Event: touch is released
    --changeAttribute: self.Position.X To; game.touchX
    --changeAttribute: self.Position.Y To; game.touchY

    that sorta seemed to eliminate some of the stutter on desktop …

    @};- MH
  • hotMagichotMagic Member, PRO Posts: 266
    We constrain it using a bunch of Trig (they stay on circles as they are aimed).

    @MotherHoose, Thanks for the suggestion...I'll investigate what you're talking about tonight.
Sign In or Register to comment.