Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: Xander Davis on July 05, 2017, 07:51:35 AM

Title: tvOS: Raycast Action Seems to Fail on ATV
Post by: Xander Davis on July 05, 2017, 07:51:35 AM
Raycasting works in the editor, but not in an Apple TV 4 build (tvOS 10.2.x)

I figured out it was raycasting by isolating the FSMs responsible in a simple seeking AI set-up I'm building.  When I bypassed the need to raycast, the AI seeks the player, so the Radar FSM with the Raycast action seems to be the point of failure.

Advice?  Help?
Title: Re: tvOS: Raycast Action Seems to Fail on ATV
Post by: Xander Davis on July 05, 2017, 08:02:49 AM
Okay, I think I found a work-around but the bug itself apparently remains.

I created another state with a Wait set to 0.1 and had it loop back to the state with the Raycast.  Now it works on ATV.

Again, without this, it worked in the Editor, so something's up with this action on tvOS.  At least this workaround has it running now at all!
Title: Re: tvOS: Raycast Action Seems to Fail on ATV
Post by: Xander Davis on July 06, 2017, 01:16:45 AM
Well the fix suddenly stopped working.  I didn't change it at all so I don't know why it originally worked or why it suddenly broke again...

Hmm...

Advice?
Title: Re: tvOS: Raycast Action Seems to Fail on ATV
Post by: Xander Davis on July 07, 2017, 05:40:51 AM
Okay well good news-- I realized there was a conflict with the default Unity AIThirdPersonCharacter nav mesh agent AI script's seeking target transform instruction and the one I was creating in PlayMaker.  While it somehow worked in the editor with the PM one, on ATV it was looking for the one on the Unity script.  I joined the two by having PM assign the transform into the Unity script and it works fine now on both the editor and ATV.
Title: Re: tvOS: Raycast Action Seems to Fail on ATV
Post by: djaydino on July 07, 2017, 08:35:43 AM
Hi,
I am happy you got it to work and also explained what you did, even when no one replied yet to your post.  :D