playMaker

Author Topic: Unity-ARKit-Plugin  (Read 17217 times)

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Unity-ARKit-Plugin
« Reply #15 on: September 25, 2017, 11: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? 


Groo Gadgets

  • Beta Group
  • Full Member
  • *
  • Posts: 175
Re: Unity-ARKit-Plugin
« Reply #16 on: September 28, 2017, 10: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

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Unity-ARKit-Plugin
« Reply #17 on: September 28, 2017, 11: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.

Padenlee

  • Junior Playmaker
  • **
  • Posts: 63
  • You can't hit what you don't shoot for!
Re: Unity-ARKit-Plugin
« Reply #18 on: October 02, 2017, 04:01:26 PM »
Thanks for making this happen! I'm also looking forward to these actions.
« Last Edit: October 02, 2017, 04:12:20 PM by Padenlee »
-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone

dt1000

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Unity-ARKit-Plugin
« Reply #19 on: October 11, 2017, 12:21:24 PM »
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

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

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

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

Groo Gadgets

  • Beta Group
  • Full Member
  • *
  • Posts: 175
Re: Unity-ARKit-Plugin
« Reply #20 on: October 12, 2017, 03: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  :-)

dt1000

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Unity-ARKit-Plugin
« Reply #21 on: October 12, 2017, 07: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

q21turner

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Unity-ARKit-Plugin
« Reply #22 on: October 17, 2017, 07:51:00 AM »
This is amazing thank you so very much!

Groo Gadgets

  • Beta Group
  • Full Member
  • *
  • Posts: 175
Re: Unity-ARKit-Plugin
« Reply #23 on: October 28, 2017, 03: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

dt1000

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Unity-ARKit-Plugin
« Reply #24 on: October 29, 2017, 08: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.

Litow

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Unity-ARKit-Plugin
« Reply #25 on: May 24, 2018, 05:56:34 AM »
Just searched for arkit on the forum and happened here.
Checking if there was any update. :)

It looks like that google drive address is down now... :( I missed out.

Cant find anything under the ecosystem either.
Any suggestions from the forum? :)

ps - I loooooooooved Tsuro. Very well done...

dt1000

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Unity-ARKit-Plugin
« Reply #26 on: May 24, 2018, 08:31:09 AM »
Glad to hear you enjoyed Tsuro! :D

We just added AR to Roll For It! using the same system. It was super easy.
https://itunes.apple.com/app/roll-for-it/id1002886058?mt=8

I've uploaded the latest version of the actions to a new Google Drive directory.
You can find it here...
https://drive.google.com/open?id=1WjWWgf9kkj0-mIanZJxd1xIJ-re4R39c

I can't recall if the actions rely on any bespoke scripts on objects... but I think they should work with the ones included in the latest version of the AR Kit plugin. You will need to set up your AR system in a similar fashion to the demo scenes from the plugin though!

Cheers,
Dan

Litow

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Unity-ARKit-Plugin
« Reply #27 on: May 25, 2018, 08:48:01 PM »
Thank you for such a support to the forum, Monsieur.
Quite appreciated myself.

If I knew you guys were developing a dice app, we could have joined forces.. ;)
This is mine... it also allows for putting custom text and photos on the dice faces.
https://itunes.apple.com/nz/app/dice-companion/id1104730277?mt=8
But no AR support... ;)

Maybe some option to think about to add to your nice and polished version.
It would be quite easy to do with Playmaker.


jamdalu

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Unity-ARKit-Plugin
« Reply #28 on: June 05, 2018, 10:40:27 AM »
DT - Thank for sharing the actions!   A++++ ;D