A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by jjxtra, Apr 25, 2016.
Input.touchCount or Input.touches?
Try calling JoystickScript.PanGesture.Reset, let me know how it goes...
No, didnt help. Maybe this will help you, help me?
Debug.Log("Instance before: " + FingersScript.Instance.GetInstanceID());
result: instance before: -944096
app interupted .....
.... app resumed.
Debug.Log("Instance after: " + FingersScript.Instance.GetInstanceID());
result: instance after: -944096
Do I somehow have to remove this instance? If yes, how.
You could call FingersScript.Instance.ResetState(false) or even FingersScript.Instance.ResetState(true) then re-add the joystick prefab and any other gestures you want.
Debug.Log("Instance before reset: " + FingersScript.Instance.GetInstanceID());
Debug.Log("Instance after reset: " + FingersScript.Instance.GetInstanceID());
still shows the same instance id. (exact same result if I use FingersScript.Instance.ResetState(false);
I created a work around, however I needed to add it to fingersjoystickscript, which is something I don't want to do.
public void resetjoystickimage()
I then call resetjoystickimage. This helps reset the joystick to center, however the joystick is still recognizing the last position, so the character keeps on moving in the previous direction. Not perfect however it fixes my main issue.
The reset method will not change the instance id. I will look at adding a proper reset method to the joystick script in next update soon.
public void Reset()
lastMoveJoystickToGestureStartLocation = false;
Update is sent, look for it in a few minutes - 2.7.4.
Any Playmaker support?
Thanks its working. BTW - The support you provide is unnaturally quick.
Glad it is working! No playmaker support currently.
Dang, ok. Will have to wait then.
Small request: Could you replace the DPI warning by an info log? We have a zero warning policy and while I love your frequent updates, I always have to remove it manually. Bonus: Allow to register a log callback so I can route the logs through our own logging system, not so important though
I refreshed the same version with an info log. Try a re-download in about an hour.
Have anyone faced the problem that on PC (in editor) pressure which is not supported constantly return 0 instead of 1 as unity does if pressure is not supported?
I've not heard of that but it could very well be a bug in Unity. I just pass along the Unity touch object pressure...
I've sent a refresh update that defaults pressure to 1.0 for mouse touches.
Hi, apologies for the repost but still haven't been able to find an answer to this one:
Hi there, I was wondering if there was an easy way to use swipe gestures simultaneously with image recognition? This is to allow the player to control a character with swipes and also to draw images for special actions. The problem I have is that swipes happen midway through an image being drawn. I thought I would be able to use something like:
But it seems that the image recognition script (or at least the one called
FingersImageGestureHelperComponentScript) isn't a GestureRecognizer in the same way the other scripts are.
Currently I'm using coroutines to delay the swipe action until after the player has lifted a finger to check if something has been drawn first, but this is introducing a delay and is quite fiddly to work with.
Would appreciate any help you can give me, thanks! I just bought the asset and I'm loving it so far. Sorry if this turns out to be a noob question...
Image recognition gesture does not have a good way to fail unfortunately. Like a pan gesture, it will execute happily until the finger is lifted.
Probably the best is to allow simultaneous execution, and call Reset on the image gesture if the swipe gesture executes.
Hi, I am using Fingers together with InControl by using the VirtualTouchObjectHandler, hence TreatMousePointerAsFinger and ProcessUnityTouches are disabled. However, with this the mouse scrollwheel doesn't work anymore. Can you make it work with these flags disabled? You could also allow to set a callback for querying the mousewheel, however in my case I would just give you the unity input.
Download 2.7.5, I split up the mouse pointer into a new mouse wheel boolean on fingers script. Now you can have just a mouse wheel without a mouse pointer.
I was looking for a gesture recognizer and I found this asset.
I saw the tutorial and I understood how to teach the system with my own gestures.
Basically, in my game, I want to allow the player to trace magic symbols on the screen and this will trigger some internal mechanics.
Is it possible to create some particles effects and trails during the player gestures to improve the visual quality of the action?
I still don't have the asset so I did not have the chance to explore the code or make some experiments to figure it out on my own.
If the answer is yes, could you give some more information on how to do it?
Thanks a lot!
Unity particle system and trail system is your best friend here. Just convert gesture screen coordinates to world coordinates, set the particle position and and call emit on the particle system.
Hello, I want the camera to rotate and zoom around the earth.I want to limit the rotation of the camera to the Antarctic or the Arctic so that it does not cross. What shall I do? Thank you very much.
Probably a simple pan gesture with a transform orbit around call in your script. You can clamp the position and/or angle easily enough in a custom script.
Hello! I set "Orbit X Max Degrees" to "90" and succeeded in limiting the main camera, which would not cross the North and South Poles.
The main camera is in position A. When the scene starts, I want the main camera to see China. So I set the camera position and rotation through the code. The problem is that the main camera can cross the North and South Poles again!
I want the main camera to see China, and I don't want it to cross the North and South Poles. How do I dynamically set the camera position and rotation? Thank you very much.
I use gesture and mouse control in my project at the same time. Is mouse operation detected through this plug-in? Which interface detects the mouse?
Do you mean touches and mouse control? By default the mouse will generate a touch for the mouse pointer.
Fingers 2.7.8 is out and includes much improved virtual touch handling. Please see DemoSceneVirtualTouches and DemoScriptVirtualTouches. I've revamped the architecture a bit and improved things. If you get this update and use virtual touches, you will need to do some tweaks based on the new DemoScriptVirtualTouches.
You will need to create a script that clamps the camera position and/or rotation.
I need an interface like GoogleMap APP.
・ "Filck" Pan Gesture moves the map using inertia, and "Swipe" Pan Gesture moves the map by the amount of swipe without using inertia.
・ "Filck" Tilt Gesture tilts the map using inertia, and "Swipe" Tilt Gesture tilts the map by the amount of swipe without using inertia.
・ "Filck" Scale Gesture expands the map using inertia, and "Swipe" Scale Gesture expands the map by the amount of swipe without using inertia.
・ "Filck" Rotate Gesture rotates the map using inertia, and "Swipe" Rotate Gesture rotates the map by swipe without using inertia.
・Each inertia stops when you tap it during Swipe.
How should I implement it with Fingers?
Do you have a good sample?
There is a demo scene DemoSceneCameraMove3D that is your closest bet, you can pan, pinch rotate or zoom and two finger pan to tilt. It is similar to Google Earth / Maps, a good starting point. All gestures in that scene have inertia.
Quick question: where is the documentation for Fingers? The Support website and Publisher website links in the Asset Store go to the same webpage, and clicking on Fingers there just goes back to the Asset Store... The asset info links to an old-school mailing list, various demos, Discord and here. Are there "quick start" / "quick reference" / "api reference" docs somewhere that I'm just not finding?
The best documentation right now are the demo scenes and demo scripts and of course ask me anything. I’ll try to get an html doc up somewhere soon of all the classes and methods.
You can also download and play with the free version if you just want to try the code gestures and see if it’s a good fit.
I have the full version already, but I was bootstrapping a new project and didn't want to repeat all the exploration I did on first using Fingers. In the end I just referred back to the previous project to refresh my memory. That got me up and running on the new project.
Even so, I'm betting there's a lot more functionality than I've discovered so far since I haven't picked apart every one of the demo scenes and scripts. More accessible documentation would be helpful.
I'm using sandcastle right now to generate some html docs, I will post a link when they are online.
All my documentation is going to live here now:
Right now fingers gestures is the only asset, but I will be adding Weather Maker, Procedural Lightning and Fast Line Renderer in the future.
Awesome, thanks for posting that; I'll take a look after the weekend!
You're welcome, it should have every class, function and property in a nice html format.
I'm facing a situation which I can't grasp. I'm using the virtual joystick as input and a gesture so tap will be a fire action.
While the player is moving the tap for fire isn't executed. I got it working to some extend when setting ClearTrackedTouchesOnEndOrFail to true. However this seems to be interrupting the joystick movement. Any idea on how to solve the moving and tap at the same time?
Code for the fire gesture:
fire1Gesture = new TapGestureRecognizer();
fire1Gesture.StateUpdated += TapGestureUpdated;
fire1Gesture.ClearTrackedTouchesOnEndOrFail = true;
Sounds like a bug. I will add a tap to the joystick demo scene and make sure it works and post back.
I refreshed the latest 2.7.8 update, please re-import from asset store and try the demo scene joystick with tap. The tap will rotate the square slightly. DemoScriptJoystick.cs is the script.
Let me know how it goes...
Seems to be working fine now, thanks!
Awesome, post some screenshots of your game if you have time
Code documentation has moved to https://unitydocs.digitalruby.com
Fingers Gestures 2.8.0 is out, I am starting to add a full projects folder and the first project is a word game where you can drag letters around and make words. It is work in progress, will update and add more stuff as I have time.
Hi @jjxtra, had to rework my mobile UI to match more the type of game so I kicked out the previous working joystick and went for a dpad like method and I'm facing an issue. What I did is using the dpad script as temple but my 'controls' are skattered accros the UI. So the left move is on the left of the screen, right move on the right and up and down somewhere in the middle. Everything seems to working fine but I notice when running even when removing my figure from the dpad images the movement is still happening until I tap somewhere else on the screen. Is there a way to let the movement stop when removing my figure from the dpad image? I tried setting the horizontal and vertical movement to 0 on gesture end or failure but that doesn't seem to work properly. (I'm using the crossplatforminput so both those fields are set). Running on Unity 2019.2.3f1.
So if the finger is still down but moves off you want it to not move?
No, the finger is off the device but the player object continues moving in the last direction set. For some reason the gesture end or failure isn't always captured.