How do I Fix this analog problem

0 favourites
  • 4 posts
From the Asset Store
Everything you need to incorporate old school hip hop bangers.
  • Hi

    I made analog controller on layer 1 and parallax is 0,0.

    Game run smoothly early then the analog become bad when player at middle of layout/Right side, that because touch.X and touch.Y is always more than analog.X right?

    How to fix that?

    Sorry for my english -_-

    thank you so much

  • Problem is that your different paralax is influencing touch.x and y.

    Thats why you must take it into account.

    Adding scroll.x/y - originalwindowheight/width should do it, I believe.

    Try to put into your line 4 this expressions:

    angle(Touch.X - (scrollx - OriginalWindowWidth/2), Touch.Y - (scrolly - OriginalWindowHeight/2), Gear.X, Gear.Y)

    min(abs(distance(Touch.X- (scrollx - OriginalWindowWidth/2), Touch.Y- (scrolly - OriginalWindowHeight/2), Gear.X, Gear.Y)) / 1, 100)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Problem is that your different paralax is influencing touch.x and y.

    Thats why you must take it into account.

    Adding scroll.x/y - originalwindowheight/width should do it, I believe.

    Try to put into your line 4 this expressions:

    angle(Touch.X - (scrollx - OriginalWindowWidth/2), Touch.Y - (scrolly - OriginalWindowHeight/2), Gear.X, Gear.Y)

    min(abs(distance(Touch.X- (scrollx - OriginalWindowWidth/2), Touch.Y- (scrolly - OriginalWindowHeight/2), Gear.X, Gear.Y)) / 1, 100)

    thank you for help.

    I already solved this problem last night, it's just add layer index after touch.X and touch.Y so it's look like = touch.X(2),touch.Y(2), Gear...

  • ramagoi

    Did not know that. Thanks for your info.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)