Forum rules - please read before posting.

Switch First Person Hotspot Interaction to Third Person?

I've spent the past two days trying to implement a puzzle with AC. It works like this:

The first-person player approaches a window that peers into a room; in this room are small toy RC cars. When the first-person player clicks on a nearby control panel--while still peering into the room--they gain control of one of the toy cars, controlling it like a third-person character with a static camera (ex: Grim Fandango). Their first-person player control becomes locked off, but the camera remains unchanged.

The problem arises when I wish to allow hotspot interaction for the toy car. When the player controls it from their first-person perspective at the window, the toy car needs to be able to detect hotspots based on its own forward-facing vector. So if the car faces a button hotspot, it needs to be able to detect and interact with it. The issue is that I can't seem to get this to work correctly. The hotspot doesn't show up relative to the car's forward vector.

I created a simple test where a hotspot disables a cube, and it worked, but the car (for now a cube) had to be facing a seemingly random and empty direction in order to see any hotspot.

Is this because AC's hotspot detection is attempting to reconcile two simultaneous player controllers?

I'm using the most recent version of AC with Unity 2019.1.9, as well as UFPS 1.


  • Interesting situation.

    If the game was only controlled via the RC car, then you could simply assign a "Hotspot Detector" to the car as a child, and use that as the area in which Hotspots become interactive. See the Manual's "Player-vicinity detection" for more on this.

    Normally, you could achieve such a gameplay change by switching players, and using script to change the "Hotspot detection mode" at the same time. However, since the RC car is already in the scene - and your first-person player is UFPS-based - that's likely not ideal.

    What you could consider instead is switch to a custom detection system while controlling the car. The Settings Manager's Hotspot detection method can be set to Custom Script at runtime with:

    AC.KickStarter.settingsManager.hotspotDetection = HotspotDetection.CustomScript;

    And then back to your default (I'm guessing Mouse Over) when you switch back to first-person with:

    AC.KickStarter.settingsManager.hotspotDetection = HotspotDetection.MouseOver;

    Once using "custom" detection, you can select Hotspots through script with:

    AC.KickStarter.playerInteraction.SetActiveHotspot (Hotspot hotspot);

    See the Manual's "Custom interaction systems" chapter for more on this, as well as the provided "Custom interaction system example" script.

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.