0 Favourites

How do I Fix this analog problem

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy 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)

  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
175 32,650
clifton11221's avatar
clifton11221
Unread hot topic
99 10,158
karshinkoff's avatar
karshinkoff
Unread hot topic
98 7,602
norum82's avatar
norum82