Search Unity

Question Triggering Video (mp4) to Play When Target Recognized

Discussion in 'Unity MARS' started by eklevynyc, Dec 11, 2021.

  1. eklevynyc

    eklevynyc

    Joined:
    Jul 18, 2019
    Posts:
    3
    I have been using a 2019 version of the Editor with AV Pro to trigger a video when a planar target is recognized and am trying now to migrate this to Unity / MARS during the trial period. I cannot place the video on my Image Marker target as a child in any way that actually triggers the video to play. I have tried simply adding the Video Player as a component; creating a Prefab, adding it as a child, and then building the Video Player on to the Prefab; and using the MARS Simulated Environment Prefab -- all without success. I would love to resolve this before my 45-day trial ends. (Additionally, help to set parameters or modify script so the video restarts from the beginning if the target is lost -- like when the phone passes from one person to another -- would be greatly appreciated.)
     
  2. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    199
    Is the marker being recognized at all, or is the problem that the video is instantiated but doesn't play?

    If you just put some simple geometry under the proxy does it appear?

    For when the target is lost you can add a Tracking State Condition to the proxy.
     
  3. eklevynyc

    eklevynyc

    Joined:
    Jul 18, 2019
    Posts:
    3
    Thank you, Ciaran. I have gotten the mp4 to play (I think the problem had been scale settings of 0/0/0 for the image marker). Now I need (1) for the vudeo player to stop when the target is lost and (2) for it to restart (not resume) when the target is reacquired. Suggestions are welcome. But, in any event, thank you for this response.
     
  4. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    199