A way to keep Item dialogue icon in the rpg =>3RD course (and left mouse click)

Hello.

In chapter 28, as for item icon in the scene, to keep the conversation icon in the RPG to 3RD person course, add this to the Brian Course.

In the AIConversant.cs script, add IRaycastable to the class:

public class AIConversant : MonoBehaviour,IRaycastable, ITarget 

then add again the HandleRayCast method but without the input test to start dialogue:

        public bool HandleRaycast(PlayerController callingController)
        {
            if(dialogue == null )
            {
                return false;
            }

            Health health = GetComponent<Health>();
            if(health && health.IsDead()) return false;
                               
            return true;
        }

And you will keep your dialogue Icon in this rpg to 3RD person Update.

If you choose to left click to talk, just define it in your Controls (input Actions) in Unity.

It works nicely too :slight_smile:

Schuuss

François