I’m working on a placement system which uses GUI buttons to rotate the object being placed, these buttons are used for mobile support. You tap the screen to place the item or click the Place button. The object moves relative to the mouse position and when you click the place button it is placed. However, the issue I have is that when I click the Rotate Button on mobile, the mouse click goes straight through the GUI button and immediately places the object in a completely different area. Doesn’t even rotate the object as it is already placed before the script has time to rotate it - placed in the position of where I tapped the Rotate Button. I just want to rotate it - not place it at the same time in a different area! I use UserInputService to detect the mouse movement and move the object to the mouse’s target. Is there anyway to fix this so that the object doesn’t move when I click the GUI - and only when the mouse target is not over a GUI object?
The issue is most prominent on mobile because a GUI tap initiates the placing.