Hi all,
I am trying to access an entity in the PlayCanvas-ar,js script when the camera ‘sees’ the AR Hiro marker.
This is the code where I try to access the entity via this.app.root.findByName().
The code is just meant to alert the entity’s position like so -
alert(this.app.root.findByName('Box').getPosition);
However, I get an error saying that undefined is not an object, though “Box” is clearly part of my entity hierarchy -
Why can’t I access ‘Box’? Please help me out!