playMaker

Author Topic: Play new animation when camera gets close to game object (Vuforia AR)  (Read 2244 times)

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
Hi,
 I'd like some ideas on this. Here's a video showing more. (ignore the bad tracking, i'm improving on it).


Now at 0:25 she starts to get up...

This is a Vuforia AR - Unity3D project, and as I'm not a coder, I'm using Playmaker.
What I want to do is use the first part of the animation upto 0:25 (i already have this as a separate animation) and wait till the user with an android phone/ipad/iphone comes nearer the image target (the book cover in this case).

Then, when the user is sufficiently "close to her" the second animation triggers - the part starting from 0:26, of her waking up and turning over. - The idea is that as a person comes close to her, she gets up and turns - very rudimentary Artificial intelligence there. :)

How could I achieve this in Playmaker?
I'm thinking the solution is in finding out the distance between the camera and the gameobject.
If this is a good path to follow, may I request help with the nodes to use to achieve this?

Kind Regards.
« Last Edit: March 31, 2014, 03:43:39 PM by Playnoob »