Playmaker Forum

Playmaker Feedback => Action Requests => Topic started by: jamdalu on June 22, 2017, 12:34:12 PM

Title: Unity-ARKit-Plugin
Post by: jamdalu on June 22, 2017, 12:34:12 PM
It would be great  ;D to have playmaker actions for the new Unity-ARKit-Plugin for IOS. 

Unity forum link is here:

https://forum.unity3d.com/threads/arkit-support-for-ios-via-unity-arkit-plugin.474385/

Thanks!

Title: Re: Unity-ARKit-Plugin
Post by: artician on August 31, 2017, 06:54:03 PM
I second this!  It would be fun to work with.
Title: Re: Unity-ARKit-Plugin
Post by: tcmeric on August 31, 2017, 08:09:54 PM
I can investigate the issue. This one might take a bit of work.
Title: Re: Unity-ARKit-Plugin
Post by: artician on September 01, 2017, 09:24:27 AM
That would be wonderful.  I'm able to do quite a bit with Apple's demo resources, but some more in-depth control is probably going to be necessary if I want to use PlayMaker with it effectively. 

If I reach a satisfactory point, I'll try to share what work I've done with it so far.

Title: Re: Unity-ARKit-Plugin
Post by: dev19872014 on September 06, 2017, 05:54:11 AM
Any update?
Title: Re: Unity-ARKit-Plugin
Post by: artician on September 06, 2017, 07:22:51 AM
Not from me, so far.  I've actually spent the last 4 days wrangling with Xcode (who doesn't love Xcode???).  :)

Title: Re: Unity-ARKit-Plugin
Post by: tcmeric on September 06, 2017, 07:42:09 AM
Hi everyone. I have just finished the asset bundles actions for playmaker official. It is just undergoing some beta testing. This should free up a little bit of time to look into this further for official playmaker actions.
Title: Re: Unity-ARKit-Plugin
Post by: amazingrobot on September 12, 2017, 01:01:10 PM
this is great news and perfect timing for a project I am working on. Any updates on when this will be released?
Title: Re: Unity-ARKit-Plugin
Post by: artician on September 12, 2017, 02:05:55 PM
This is super-appreciated, and I can't wait to check it out!

Title: Re: Unity-ARKit-Plugin
Post by: artician on September 14, 2017, 05:32:16 PM
Would love to help beta-test, if possible!

Title: Re: Unity-ARKit-Plugin
Post by: dt1000 on September 19, 2017, 06:46:35 AM
Hey there!

We use Playmaker on our game, Tsuro...
http://thunderboxentertainment.com/tsuro/ (http://thunderboxentertainment.com/tsuro/)

The next update will include an AR mode, so we are working on some Playmaker actions to support this.

We'd be happy to share them with you guys when they are ready.

:D

Dan
Title: Re: Unity-ARKit-Plugin
Post by: djaydino on September 19, 2017, 07:47:13 AM
Hi,
@dt1000

maybe you should get in contact with tcmeric (http://hutonggames.com/playmakerforum/index.php?action=profile;u=15738) directly.
so you could get the actions to beta test and compare with the actions you have made.
also you could send the action you made to him to compare :)
Title: Re: Unity-ARKit-Plugin
Post by: dt1000 on September 19, 2017, 11:02:40 AM
Good call. Will do.  8)
Title: Re: Unity-ARKit-Plugin
Post by: jeanfabre on September 20, 2017, 01:49:39 AM
Hi,

 Very good! thanks for contributing :)

 Bye,

 Jean
Title: Re: Unity-ARKit-Plugin
Post by: dt1000 on September 25, 2017, 07:33:56 AM
Hi there.
Just a quick update to let you know the results of my experimentation.

The Unity ARKit plug-in provides a load of scripts that make setting up basic AR pretty easy. Trying to set something up using PlayMaker may actually end up being more work!

I have a few, basic actions made (to detect hits, and such) but they depend on the ARKit scripts all being set-up correctly.

I'll keep working and will share any actions I end up writing!
Title: Re: Unity-ARKit-Plugin
Post by: artician on September 25, 2017, 08:57:20 AM
That sounds nice.  I have a small interactive project here that uses playmaker entirely, but purely via interacting with the ARKit components directly on top of their ARKit example scene.  I haven't written any actions for my work. 

Whatever happened to @tcmeric? 

Title: Re: Unity-ARKit-Plugin
Post by: Groo Gadgets on September 28, 2017, 07:18:22 PM
Heya,

Really looking forward to these actions. I mainly want a solution to turn on and off AR functionality in my game since I don't want to create an "always on" AR experience.

I've done some experiments but can't seem to get it to work properly, the button I have made to switch between my game cam and AR cam doesn't block the raycast when I touch the button so when I tap the button the AR object moves.

Has anyone got any tips or a link to some docs on AR?

Cheers,

Simon
Title: Re: Unity-ARKit-Plugin
Post by: tcmeric on September 28, 2017, 08:55:03 PM
Hi. I am still alive  ;D

This is still on my to do list. Ill update more information here as I have it.
Title: Re: Unity-ARKit-Plugin
Post by: Padenlee on October 02, 2017, 01:01:26 PM
Thanks for making this happen! I'm also looking forward to these actions.
Title: Re: Unity-ARKit-Plugin
Post by: dt1000 on October 11, 2017, 09:21:24 AM
Hi there.
Apologies for the radio silence - things have been a bit busy here at Thunderbox HQ.

So... I finished adding AR to our game using PlayMaker. Here is a short (and shaky) video)...

https://youtu.be/CGewGIBlPpo (https://youtu.be/CGewGIBlPpo)

You can grab Tsuro from the App Store here...

https://itunes.apple.com/app/tsuro/id957124541?mt=8 (https://itunes.apple.com/app/tsuro/id957124541?mt=8)

I did end up creating a few ARKit actions... but the way that the Unity plug-in works requires a lot of components to be added to things. Creating a PlayMaker only solution for this is not a trivial task and I just don't have the time to do it.

In the interests of sharing, you can grab the actions I made at the link below, but they need  a little set-up to get them working:

https://drive.google.com/open?id=0BxYKc0FnzFsFQ01tam5fWi11VEU (https://drive.google.com/open?id=0BxYKc0FnzFsFQ01tam5fWi11VEU)

I would recommend placing the camera tracking scripts from Unity's demo scenes on your camera, maybe adding surface managers and point cloud managers as well (to help visualize) and then noodling around with the actions...

Detect AR Capability - Checks to see if you are on iOS11 with an A9 chip (or greater). Use this to show your AR UI only when appropriate.

Start AR Session - Use this to initiate the AR session before activating the camera with the AR script on (the camera script does it automatically, so you may not actually need this... I just preferred having more control).

Detect Hit - this will let your FSM know if there is a surface at the centre of the screen, so you can place an object at the hit location. Could easily be tweaked to detect a surface hit at a specific screen point, to work with a touch-based action.

Set Reticle Text - this is a bit specific to my project... it sets text based on the type of hit just detected. It will probably need tweaking to suit your needs.

Pause AR Session - you can never stop an AR session. Use this when you are done with AR to save that battery juice! Also gives you the option to totally reset the AR tracking.

Apologies I couldn't provide a more robust solution, but hopefully this will get things rolling!

Cheers,
Dan
Title: Re: Unity-ARKit-Plugin
Post by: Groo Gadgets on October 12, 2017, 12:14:12 AM
Hey Dan,

Thank you so much for sharing these actions! JUst had a look for your game on the App Store, it's featured at #1 in the AR section of the Australian App Store! Well done! I will purchase it later tonight and have a good play  :-)
Title: Re: Unity-ARKit-Plugin
Post by: dt1000 on October 12, 2017, 04:54:31 AM
Nice! We spoke to Apple regarding a potential feature... but they can never guarantee anything (which is fair enough, as there are a lot of cool apps out there).

Adding AR didn't take us too long, and has definitely given us a nice bump in sales.

Hopefully you guys will all be able to get going with minimal fuss - good luck! :D
Title: Re: Unity-ARKit-Plugin
Post by: q21turner on October 17, 2017, 04:51:00 AM
This is amazing thank you so very much!
Title: Re: Unity-ARKit-Plugin
Post by: Groo Gadgets on October 28, 2017, 12:22:47 AM
Hey Dan,

I finally had a chance to download and try out your actions. I can't get them to work :(

So I have a project with the ARKit package from Unity and PlayMaker only. I load up the UnityARKitScene.unity and create an empty object for the FSM to exist on.

I'm trying to use the Detect Hit action, I set the AR Camera and the reticle with a cube object. I've also setup the hit bool to return true when a surface is hit.

Nothing seems to happen, the bool never registers as true. This is the case in both the remote app and when I build the app to my iPad Pro.

Any help would be great!

Cheers,

Simon
Title: Re: Unity-ARKit-Plugin
Post by: dt1000 on October 29, 2017, 05:25:08 AM
The will detect planes and other AR surfaces generated by the plugin. If your area is dimly lit or not clear and flat, you won't get a hit. Test it with another AR app first, to be sure. I couldn't actually test Tsuro in my office because it is too dingy!!! :(

Can you post a screengrab of your set up and FSM with the Hit Detection action visible? I can double check you have it set up right.