Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: fluctuhon on February 14, 2014, 12:23:24 PM
-
Hello,
I have some issues with Vuforia (v2.8.7), Playmaker (v1.7.7.f6) and Unity (4.3.4f1)
The playmaker events "VUFORIA / TRACKING FOUND" and VUFORIA / TRACKING LOST" seem to work randomly.
When i'm trying to track an image, Unity and vuforia can recognize it (the log says "Num trackables detected: 1" and the AR camera is following the image) but the event only triggers 1 out of 30 times..
I have the vuforia playmaker proxy in my scene and the vuforia trackable script in my image target (i also tried to desactivate the default trackable event script, same result)
I used vuforia with playmaker for another project without a single problem, but it was in Unity 3, is there a problem with unity 4 ?
Thanks in advance
-
I'm even not able to import Playmaker proxy with Vuforia 2.8.7
==
Assets/PlayMaker Vuforia/Scripts/PlayMakerVuforiaProxy.cs(60,37): error CS1501: No overload for method `GetTracker' takes `1' arguments
===
Please update Add-On.
Unity 4.2.2 + PM 1.7.7 + Vuforia 2.8.7
thanks
-
This issue can be fixed, it has been solved here : http://hutonggames.com/playmakerforum/index.php?topic=5817.0
My case is really strange and really random.. Sometimes it works, sometimes (often) it doesn't. I don't want to downgrade to unity 3 just because of that :/
Does anyone have an idea ?
-
Please try this method. Simply, it's calling LOST/FOUND event from script
just few edit in DefaultTrackableEventHandler.cs
input this line into private void OnTrackingFound(). It looks like
//….
using HutongGames.PlayMaker;
public PlayMakerFSM myFSMtracking;
// drag and drop the FSM that has public "FOUND TARGET" and "LOST TARGET" events in inspector
private void OnTrackingFound()
{
//Playmaker Event Trigger FOUND TARGET
myFSMtracking.Fsm.Event ("FOUND TARGET");
//... original code
}
and this if you want to recipe LOST target event
private void OnTrackingLost()
{
myFSMtracking.Fsm.Event ("LOST TARGET");
//... original code
}
it works well and reliably for me.
Hope this helps.
-
Thank you for your answer,
This seems to work more often than before, but it still not works every time..
I really can't understand why, maybe it's a more general problem with playmaker ?
EDIT : I tried downgrading to playmaker 1.5, Same problem
-
did you try to detect multi-targets? if so, how many are they?
-
I only have 1 image target in my scene, but i do have multiple images in my data set (20 images). These images can be pretty similar, so maybe vuforia is confused because of that
-
did you use Makers? For some similar images, it's recommended that you should cover them by Makers then using "maker detector" is much faster and get results as expected.
-
Are you referring to that : https://developer.vuforia.com/resources/dev-guide/frame-markers ?
I'm not sure what to do with that and how i'm suppose to use it with playmaker
Thank you again for your time and your answers :)
EDIT : Ok, i think i understand how this works. I'll try to use markers within my images and i'll see what happens. I'll let you know ;)
-
I tried using markers : Same problem : the markers are detected but the playmaker event is not responding...
-
Hi,
Hopefully, I'll have time to look at this properly. I don't think it's a problem with PlayMaker, but more likely a change in Vuforia that broke the bridge I created.
bye,
Jean
-
I'm bumping this thread, as I'm having the same issues - Using the playmaker Vuforia TrackingFound / TrackingLost is not triggering animation events consistently. - Sometimes it works, sometimes it does'nt.
(This maybe related however...and i'm only guessing here... if Vuforia's "Extended Tracking" tickbox is checked.)
However, what i'd love to see is a Playmaker Vuforia interface that provides:
- Tracking found/lost for Image Targets
- Tracking found/lost for Frame Markers
- Enable/Disable Persistent Camera Tracking function
About the last one (Persistent Camera tracking) I'd written on the Vuforia forum and got this code from them to add. I quote:
You can enable/disable the PersisteExtendedTracking option using the C# API of the ImageTracker class; you can write a script and attach it to your ARCamera, and put this code in the script:
ImageTracker tracker = TrackerManager.Instance.GetTracker<ImageTracker>();
tracker.PersistExtendedTracking ( true ); // or false, to disable it
----
Yes, I'm embarrassed to say, I don't know the first thing on how to write the C script for this, that's why I use Playmaker ;)
Any help on how to implement the script or a Playmaker action to do this would be great.
Kind Regards.
-
Hi,
ok, done, Please redownload from the wiki. It does work better without persist on, but I guess it may be on a per case deal.
you'll find an action to enable disable that setting, and also, it's also available in the vuforio behavior themselves, so you can check it manually on the behavior.
Bye,
Jean
-
How can I leave the Extended Tracking mode with Extended Persistent Tracking together, always ON both, in image target track.
in Unity.