Forum rules - please read before posting.

[Issue] Hotspot: Int.Source "Custom Script" - Player faces toward negative X world space axis

Steps:

  • Create a Hotspot
  • Set Interaction source: Custom Script
  • Set Unhandled Inventory Interaction to reference the same GameObject the Hotspot is on
  • Set Message to send to a valid Value handled by a custom script on the same GameObject
  • Set Player Action: Walk To
  • Set Face after moving to True
  • Set minimum distance to True
  • Set Proximity to 0.1 (or even 1)

Expected behaviour:
The player walks towards the Hotspot, reaches minimum distance, turns to face target, and only then it fires the custom message to the custom script

Current behaviour:
The player walks towards the Hotspot, reaches minimum distance, turns to world-space negative X axis, and fires the message to the custom script

Sample setup image:

Issue in action ad-hoc video:
https://drive.google.com/file/d/1812JlYE7hsncx37Yy8BIUoskoJZGEy7s/view

Comments

  • edited August 2019

    Open up PlayerInteraction.cs and find line 1245:

    lookVector = _hotspot.transform.position - centrePoint;
    

    Replace it with:

    lookVector = centrePoint - KickStarter.player.transform.position;
    
  • Replace it with: lookVector = centrePoint - KickStarter.player.transform.position;

    working like a charme! Thanks again Chris! :)
    This finally wraps up the entire vase puzzle chapter :D
    ...but the head glitch when picking up those from the room.
    I will provide more info on the appropriate topic :)

    Thanks again for such a blazing fast fix! :)

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.