Make NPCs follow you with just their head

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024
  • Here is the simple C# script to rotate the NPC's head to follow you so as you walk around, it continues to follow with it's gaze. It uses the tag player to find the player in the scene and get the player's transform to know what direction to rotate. It also has a max rotation of 45 degrees that can be modified by the user. You can also choose the axis to rotate in the inspector.
    Code here: tinyurl.com/55...

Комментарии •