Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch.touchPoints doesnt work #571

Open
reaperspeeds opened this issue Feb 22, 2018 · 6 comments
Open

Touch.touchPoints doesnt work #571

reaperspeeds opened this issue Feb 22, 2018 · 6 comments

Comments

@reaperspeeds
Copy link

[MainScene.txt](https://github.com/HaxePunk/HaxePunk/files/1749480/MainScene.txt)

I am trying to use touchPoints like it uses to be in the version 2.6.1 that work fine, but in the version 4.0.1 this doesn't work at all, even recognize a touch

@bendmorris
Copy link
Member

There was an issue preventing Touch from being registered as an input handler; I pushed a fix for that.

I can confirm that Touch.update is called now but I'm still not seeing any TouchEvents fired locally. Not sure what would cause that.

@reaperspeeds
Copy link
Author

what are the differences of using touch in haxepunk compared to this example with only openfl ( https://gist.github.com/iam-jim/47c092f1943c1364a8d8 ), suddenly there is something that was missing and I would like to help.

@bendmorris
Copy link
Member

Appreciate the offer to help. You can see in https://github.com/HaxePunk/HaxePunk/blob/dev/backend/flash/haxepunk/_internal/FlashApp.hx and https://github.com/HaxePunk/HaxePunk/blob/dev/backend/flash/haxepunk/_internal/TouchInput.hx that we are doing basically the same. I haven't spotted a difference, can you?

@reaperspeeds
Copy link
Author

reaperspeeds commented Feb 27, 2018

i only saw a difference with the listeners can you tried the listener directly with Lib.current.stage as stage of the sprite i do't know much but this is something i saw different, maybe need the global stage ?

@bendmorris
Copy link
Member

There's only one stage, they're the same object.

@TheSpydog
Copy link
Contributor

I've been experimenting with the example Scene provided, and it seems like the onTouch function is called just fine. I put trace(touch) at the beginning of the function, and made a couple discoveries: neither touch.pressed nor touch.released are ever true. The latter makes sense (it's described in code as not being implemented yet) but I'm not sure why pressed is never true...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants