Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Multi Touch

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 14th Aug 2015 21:04
Hi.

I have 3 button in my game and wrote a code for them. but somrtimes arrow buttons don't work. this is my multi touch code, anyone can tell me where is the problem?



Thanks.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 14th Aug 2015 21:26
this line should have x,y correct, don't know if this the issue itself.
GetSpriteHit(ScreenToWorldX(GetRawTouchCurrentX(event[1])),ScreenToWorldX(GetRawTouchCurrentY(event[1])))

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 14th Aug 2015 22:47 Edited at: 14th Aug 2015 23:06
hmmmm...
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 14th Aug 2015 22:48
Quote: "this line should have x,y correct, don't know if this the issue itself.
GetSpriteHit(ScreenToWorldX(GetRawTouchCurrentX(event[1])),ScreenToWorldX(GetRawTouchCurrentY(event[1])))"


I think problem is relate to ScreenToWorldX(GetRawTouchCurrentY(event[1]))).

I should use ScreenToWorldY instead ScreenToWorldX

Thanks Markus, if there is any problem I ask again.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 14th Aug 2015 22:51
Yo

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-09-29 03:17:18
Your offset time is: 2024-09-29 03:17:18