Forum rules - please read before posting.

Hotspot vicinity issue with multiple playable characters

edited October 2021 in Technical Q&A

Heyo, my game uses vicinity for hotspot detection and I have the following issue:

Playable character A stands by a hotspot, properly highlighted due to her vicinity. I switch to playable character B simply using Player: Switch, we are in the same scene but a different location, the hotspot is correctly un-highlighted, all is well so far.

Now I change back to character A using Player: Switch and I use Replace old Player's position, (because such is the nature of Character A - it always "spawns" from Playable character B ). So now Playable character A is in action again, but is no longer standing by the original hotspot. However, the hotspot is still highlighted, as if A was still standing in its vicinity. At this point, pressing the Interact button will trigger the hotspot, regardless of how far away from the hotspot we are.

I am on 1.74.2 but had the same problem on 1.73. I'm on unity 2020.3.16f1

Thoughts?

Thanks!

t

Comments

  • Thanks for the bug report.

    Can you share a screenshot of your Settings Manager? I'll need to know some of the finer details in order to attempt a recreation.

  • Sure,

    https://imgur.com/a/K09VmZ2

    Let me know if there's anything else.

    Thank You,

  • I'm having trouble reacreating this, I'm afraid.

    To be clear: you're saying the Hotspot de-activates when switching to Character B, and then re-actives when switching to Character A (with A appearing at B's position)?

    Do any relevant messages appear in the Console, and does this occur if you swap Character A's prefab with Tin Pot from the Demo game's Resources folder?

  • Yes I get the same result with tinpot and yes you've understood me correctly.

    I have, however, found the problem.

    Immediately after doing the player: switch back to B, I used player: teleport inactive on A to a playerstart in the current scene. That's what breaks it. If I simply don't do that, or like I'm doing now, instead send player A to a completely different scene, the problem doesn't appear.

    The point is for player A not to be visible when playing as player B, so sending it to a completely different scene is a perfectly good (if not even better) solution. I'm not sure why I didn't do that in the first place. legacy stupidity, probably.

    Thank You!

    t

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.