So in my game, you meet a lady, Lina, who has a neck tattoo. She is set up as a hotspot with a polygon mesh, and over that I have a box collider hotspot for the tattoo. The former hotspot triggers talking to her, the latter is supposed to trigger looking at her tattoo, but does not work:
When I run the scene, no matter what happens, the tattoo hotspot is obscured by her polygon mesh hotspot. Here's a video:
HOWEVER, mysteriously, when I make an actual build, the hotspot DOES appear... but above the neck tattoo graphic, not over it. Video:
Things I've already tried to force the neck tattoo hotspot to appear above Lina's hotspot:
What am I doing wrong? And - why is it functioning differently in the build versus the Unity Editor? Any help would be greatly appreciated!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What are your AC/Unity versions?
You mention the neck Hotspot relying on a Box Collider - is that the 2D or 3D variant?
Generally, the detection order should be based on distance to the camera - so nudging the neck Hotspot's position on the Z-axis a little lower should do it. The ordering of the sprite won't be a factor.
If you're getting strange issues along the lines of it being positioned above, build vs editor, etc, it may be a camera issue. Are you relying on a regular AC GameCamera, and is its Projection field set to Orthographic?
Are any other Camera components, other than the MainCamera, enabled at runtime? Those attached to GameCameras should disable themselves automatically.
Hi Chris,
Thanks for your comment. I have it working now! It was a Z-index issue. Thank you!
Nadya