Add Animation And Sound in AR for each target
1. SDK Version: MAXSTARSDK_Unity_3.5.2.unityPackage
2. Development Environment: Unity-Android
3. Tracker/Scanner: i want to use 8 trackers using ImageTrackable
4. License Type : Free
Hallo sir, i want to make AR using about 8 trackers, and i want to put animation and sound in each target..
can you help me how to make button that will play animation and sound depend on the tracker active.
Thank You
Hi,
We recommend like following steps.
1. Create a TrackingResultHandler class which inherits monobehaviour.
2. Create child class that inherits TrackingResultHandler.
3. Attach each TrackingResultHandler's child class to ImageTrackable (Please refer screen capture)
4. Implement each behaviour of TrackingResultHandler's child
5. Modify ImageTrackableBehaviour.cs like below.
private TrackingResultHandler trackingResultHandler;
private void Start()
{
trackingResultHandler = GetComponent<TrackingResultHandler>();
}
public override void OnTrackSuccess(string id, string name, Matrix4x4 poseMatrix)
{
...
trackingResultHandler.DoSomethingWhenSuccess(..)
}
public override void OnTrackFail()
{
...
trackingResultHandler.DoSomethingWhenFail(..)
}
Thanks,
Jack,
SDK Support team, Maxst