Open stanleyjoy opened 12 years ago
no response in 5 days!! Looks like you are really busy.. Any how, I found that only TouchPhase.Begin is recognized but the rest just not respond at all what so ever. The began phase fires every time my finger is on the screen. Hope this can be fixed easily Stan
Yes. I have been to the Nordic Game conference and we had a long weekend here in Denmark. The Touch classes should be working, we are using them in our game.
The TouchPhase is set in Input.cs in lines 68-136. Can you try to debug and see why it is not working. It is important to note that Touch will probably only work properly on a WP7 device. I am not sure that it works in the emulator.
BTW you should put your input related code in FixedUpdate
The current code will work as expected if I use Touchphase.Began in the emulator. However in the device it has some issues.
Stan P.S. Lucky bugger, you went for the Nordic Game Conference
Interesting... I will try it out to see what is going on.
Nordic Game was a blast.
I am right now busy with some update work. Will get back to this in 2 days. Stan
I found the issue but it comes with a price. Remember a while back when gamekingdom posted a issue where the GUI.Button used to work in the emulator but did not work in the device, which he solved by changing a small 'if' condition. If you don't remember check this out https://github.com/fehaar/FFWD/issues/34#issuecomment-5683186 When I reset the input.cs to the old default way. The touchphase started working again with the loss of button functionality.
Ah.... So we have to find a solution that fits both ways. Thanks for the find.
so any ideas??? Stan
Not before I have time to look at the code. Sorry.
Any Luck bro Stan
I am extremely busy with getting another title not using FFWD out the door, until that happens, I have no time to spare. Sorry.
Sorry to bug you. Give a heads up when you are free. Stan
After 6 days, dare I ask you if you are free???
13 Days and counting!!!
I am still not getting the touchPhase.Moved to work.
After applying the fix the touchPhase was working on the emulator correctly and perfectly. However in the phone it just fires Stationary and ended always. Stan
I used this code found in the Unity Script Reference to get a basic drag and translate. The code is placed in the Update method. I know touchCount works. But touch phase???
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) { Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition; transform.Translate(-touchDeltaPosition.x * speed, -touchDeltaPosition.y * speed, 0); }
Here is the link to the unity reference http://unity3d.com/support/documentation/ScriptReference/Input.GetTouch.html Stan