Forum rules - please read before posting.

Hotspots not working

Chris: I installed the Unity Rigidbody First Person Controller and it seems to be working correctly, but no hotspots are being detected. I'm trying to figure out why. It's as if the hotspots aren't there at all. I've adjusted the raycast length on the Player and it seems to have no impact. I've tried both with and without the cursor locked.

I have a tiny test project I set up similarly, and it works just fine. So .. there's something I have set wrong and I'm having trouble finding what is different between the full game and the tiny test project.

Do you have any suggestions for how I might debug what is happening?

Thanks - Ken W

Comments

  • Hi Ken,

    AC detects Hotspots by using raycasts that come from the AC MainCamera. If you use a custom camera/controller asset, you'll need to make sure that AC's MainCamera is taking the same position/orientation as it so that it can pick up the correct rays.

    If you pause the game while running, select the MainCamera and see if it's in the same place as your custom first-person camera.

    While you could look at merging the two cameras together (i.e. parenting the MainCamera to your custom one), that would prevent you from using AC's camera Actions to e.g. cut to something else as part of a cutscene/interaction.

    The more robust way would be to have AC's MainCamera continue to be the sole one in the scene actually rendering. To do this, attach a "Basic Camera" component to your custom camera, and then assign that in the Scene Manager as the "Default Camera".

    Try the Scene Manager again after doing so. Also, the MainCamera's Inspector at runtime will display whichever camera it's "attached" to - this is what you'll need to make sure is set to your own first-person camera.

    See the Manual's "Adding custom cameras" chapter for screenshots on the process.

    Also, it's worth mentioning that AC has a first-person Player prefab over on the Downloads page, which shows how to get better motion in first-person using AC's built-in controller - in case that's the reason you're looking into Unity's own.

  • Thank you! I’m sure that’s it. I’m not home now but will give it a try.

    I’m trying out the unity controller so I can have a Rigidbody and support jumping and more realistic gravity.
  • Fair enough. Built-in, jumping does require a Rigidbody - though this script on the AC wiki also enables it when using a Character Controller:

    https://adventure-creator.fandom.com/wiki/Jumping_with_a_Character_Controller

  • I may back off to that. My suspicion is that the Unity Rigidbody Controller will introduce a ton of issues I don't need or want to deal with. As soon as I get it running I'll know whether I like it or not...

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.