edited October 2022 in ORK Support
Gil,
Iv spent several hours trying to trouble shoot the 3D music player.
the Interaction controller, is a trigger and has a rigidbody collider on it. so IN theory that takes care of all the setup on the player.
But when I make 3d Music players in my scene they don't do anything.

Channel 0
Fade To
0:Town Theme
Referance

Trigger start type is only set to:
Trigger Enter

Condition settings eliminating it in battle.

Iv tried setting it to just Play and nothing.
Now if I set it to Auto start (start or Level Was Loaded) it worked fine.
But that's janky and unrefined.

Iv even tried setting it to only see the starting object with the tag Player, and still no dice :(
I even tried messing with the tag for the interaction controller...
As well as removing all conditions that might cause a state intersection.
Is something wrong with OnTriggerEnter?

Only console error iv got is:
Invalid editor window of type: UnityEditor.FallbackEditorWindow, title: Failed to load
UnityEditor.EditorApplicationLayout:FinalizePlaymodeLayout ()
Post edited by paulgswanson on
  • The Interaction Controller is only used for Interaction start types, i.e. to interact with something that's within the controller's trigger.

    The 3D music player setup is already created with it's trigger (collider) and should start when the player walks into it's trigger - naturally only if Unity's physics register it, so the player needs a collider (or character controller) and a rigidbody to be registered.

    I assume your player is ORK's player, e.g. spawned by the start game schematic or loading into the scene and spawning on a spawn point or something like that?


    The error you're getting is unrelated to any of that - not sure if this is even related to ORK/Makinom.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Yep it's a cc and I added the rigid body. And a collider specifically for the trigger. I just don't get why it ain't working. I started the project by copying your pre-built one. I hant touched collision layers at all. I'll take a peak in there
  • So j discovered that that error messages I saw were for Aura2. Removed that. But then I started experimenting.... somehow...I managed to totally break Ontrigger events... no idea how. But a script I wrote to test didn't work in this project but perfectly in the test project... like how??? Which is why music was starting on the enters...
  • Hm, check your project's physics settings (Edit > Project Settings > Physics or Physics 2D) - e.g. the Layer Collision Matrix handles if 2 layers can physically interact with each other.
    If e.g. the player and music player's layers can't collide, they'll not have any trigger interactions as well.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I figured out the prob, GiL
    my libraries folder got curropted somehow. No OnTrigger events were happening anywhere.
    Replaced the entirty of Libraries and OnTrigger seems to have recovered. Music Player 3D still not working but I can always make a work around. So consider this solved.
  • edited November 2022
    Root cause found.
    I need to check Starting Objects:
    By Collider

    No matter what I did trigger <-> trigger and trigger <-> collider just didn't work. (despite it being officially supported by Unity both ways)

    So OnTriggerEnter only worked when StartObject was set as Collider and marked as Tag Player.
    Start By Trigger HAD to be turned OFF entirely


    Bizarre.
    I am using version 2021.3.11f1 LTS so maybe they did something weird.
    Something to keep an eye out for when updating ur code
    Post edited by paulgswanson on
  • That's strange - definitely working with both on my end.

    Also, tag checks would only be available when using Start By Others settings - if it's not working without that, it means that your player isn't recognized by ORK as the player's game object. That'd only be the case if the player isn't spawned by ORK.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited November 2022
    My player is defintly being spawed by ORK. I have no player in the scene when i press start. It jumps to the Star Menu scene, then Loads my village. It then Adds MecanimTest (player) to the scene via the StartGame Schematics. I just add my test Object and cut the rest of the Party that gets added.

    So yeah something just really weird going on. But yeah Its basically fixed with those steps.
    *
    But 1 additional question if I may. I know that when you make trigger volumes its always defaulting to a Sphere Collider.
    There should be no issue with making that a Box Collider \ w trigger Enabled, right? Its technically just a collider after all.
    Which also means that I should be able to construct a zone out of this volume using multiple colliders to create a shape.

    I just don't know how your code looks at triggers, it could be specific enough to stop after the first one gets looked at via GetComponent or it could be more loose all with GetComponents. *

    I just tried it. It works perfectly fine. Just a thought but maybe you can add that little trick to the tutorials. Something like" Extra Credit, try replacing the sphere collider with a box collider. You can additionally combine multiple colliders to make more complex music zones. Go on give it a try!"
    Post edited by paulgswanson on
  • Yes, the kind of collider doesn't matter, box, sphere, etc. - all work the same here.

    You can also have multiple music players with the same setup, if the music is already playing it's not changing to the same music again. So, creating a zone out of mulitple triggers/music players is working as well.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.