Interact with object problem


(Helgard de Barros) #1

So I have an object with the interact object script on it.

54

My input settings are:

52

51

And I want to right click on the object:

53

But if I click on the object with the right mouse button, nothing happens, with the left button I am getting the debug message “click”.

Am I understanding this wrong. All my other interact actions, like talking to NPC’s and picking up items are working fine, and all my attacks are working fine as well.


(Leslie Young) #2

Those Events are mapped to the Unity ones, like https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseDown.html My guess is that they only respond on left-click.

The interaction with NPCs and picking up is code which casts-rays on right-click to see what you are trying to interact with. They are not making use of those Unity events (functions).

You are looking for plyRPG > Object > On Interact