Hello, I have a huge problem getting one thing to work (I’m not a programmer so I’m struggling a lot with basics often).
First of all here’s an image that may help in understanding me. Dropbox - Error - Simplify your life
Now, I want a game to tell how close is Player to a collider2D (Mesh or Box, I assumed Box will be easier). Earlier I had it solved by adding a trigger sphere collider on a Player and it returned a message when hitting the other collider. Worked perfectly fine but now I want to differantiate messages according to collider relative position to player (above, below, left and right) I tried to do separate colliders for every possibility and give them different tags, what I assume would work but it creates new problem - if the walls are thin then the sphere collider on a player will recognize both above and below or left and right colliders. Therefore I’ve tried to create if instruction that checks 1. if the collider tag is “above” and 2. if the Y of this collider is less then players Y (more if below and so on).
And I don’t know how to ask for position of the collider my sphere is colliding with at the very moment. I don’t want to add different tags for all the colliders as there can be a lot of them in one scene.
So, if there’s an easy solution to my problem I would be really greatful as I cannot sleep without it being solved