playMaker

Author Topic: tvOS: Raycast Action Seems to Fail on ATV  (Read 224 times)

Xander Davis

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
tvOS: Raycast Action Seems to Fail on ATV
« on: July 05, 2017, 04: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?

Xander Davis

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: tvOS: Raycast Action Seems to Fail on ATV
« Reply #1 on: July 05, 2017, 05: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!

Xander Davis

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: tvOS: Raycast Action Seems to Fail on ATV
« Reply #2 on: July 05, 2017, 10:16:45 PM »
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?

Xander Davis

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: tvOS: Raycast Action Seems to Fail on ATV
« Reply #3 on: July 07, 2017, 02: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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2303
    • View Profile
    • jinxtergames
Re: tvOS: Raycast Action Seems to Fail on ATV
« Reply #4 on: July 07, 2017, 05: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