Hello, I am developing a side scrolling 2d game.

This works fine when the interaction controller is manually added to the character's root object, but does not work when it exists as a child of the character using the Add automatically toggle.

The state of my object setup is as follows.
1.Interaction controller 2d was created through the Oㄱk Scene Wizard.
(rigidbody 2d, boxcollider 2d, interaction component)
And
2. My character's root object has a rigidbody 2d and a boxcollider 2d.
 
In my opinion, the root object also has a rigid body and a boxcollider.
Since the interaction controller has the same components, it does not seem to work.
However, after several tests, we confirmed that the interaction does not work only when it exists as a child of a character.

Why is that?

In the case of the 3d brown pants character of the tutorial project
It worked fine.
(Interaction controller 3d exists as a child of brown pants)
  • Hm, that's pretty strange - it should definitely work, if child triggers wouldn't work if their parent also has a trigger/rigidbody, Unity wouldn't be very practical :)

    Think you can send me a small Unity test project with your setup to contact@orkframework.com? E.g. upload it somewhere (dropbox, google drive, etc.) and send me the link.
    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!
  • Thank you for your kind support.

    I mailed my test project with a small explanation !!
  • For others running into this problem:

    The issue is the project’s layer collision matrix in Edit > Project Settings > Physics 2D in the Unity menu.
    The interaction controller created by ORK is put on the Ignore Raycast layer (to, well, not interfere with raycasts). If the layer is set up to not collide with anything, it'll not be able to recognize interactions.

    Fixing this is either changing the collision matrix or just changing the layer of the interaction controller (prefab). Once it’s on a layer that can collide with interactions, it’ll work fine :)
    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!
  • Solved. Thank you!!
    It seems that my assets have been imported and changed the settings.
    After making it possible to collide with the layers of the interaction object, everything works fine.
    nice!
Sign In or Register to comment.