- Home /
Right click inventory function not working :S
Hi, im trying to set up my Inventory system. It is working well, except I am adding a right click function that stays forever. :S
Here is what I have to get rid of it:
if (Event.Current.type == EventType.mouseMove + 30) {
rightClickItem = false;
}
Obviously its wrong and not working. But its not throwing errors either.. What statement would I use to say when the mouse moves away 30 pixels?
Regards Nick
Answer by Lazdude17 · Jul 30, 2014 at 01:54 AM
You probably need to give more info. I'm pretty unsure of the functionality you're looking for. But I can take a shot at it.
You can use Input.mousePosition to get the position of the mouse and store that in a temporary variable then check if the mousePosition.x or y Absolute value is 30 less or more than it was in the temporary variable.
That's about all I can say without more info. What is the right click function you are making? What does it do?
Your answer
Follow this Question
Related Questions
How to optimize this script and add items imediately without grids 0 Answers
How to ignore base class? 1 Answer
Creating an interactable inventory? 1 Answer
Inventory stack system problam 0 Answers