12/13/2023 0 Comments Mouse coordinates gamemakerOnce their cursor is on the location, and left mouse button is held, the box coordinates will change depending on the mouse_x and mouse_y. This will allow you to have that object stop at the wall or anywhere you want it not to travel through. Im not sure which is the trouble maker, but when I need to detect a hover, I create an object for the mouse (with a single black pixel for the Sprite, so it has a collision mask), and then use the event that checks for collision with objmouse. If you want to be able to check your coordinates often, then your best bet is to write a Windows script that you can run anytime you need to run your check. Id go with having an object that looks like the mouse to follow the mouses general location via going to the mouses coordinates at a set speed. Here are some photo examples as to what I mean: Note that my. I remember when I first found this, I reverted back to the previous runtime from October, and the issue wasnt there. I'm trying to make popup boxes that can be moved around if the player presses and holds left mouse button while the cursor is on the upper portion of the popup box. From my experience, using placemeeting & mousex/mousey for detecting hovers doesnt work very well. For some reason, as of the December runtimes, the in room coordinates for the mouse seem to be very inconsistent. I fixed this by adding the "point_in_rectangle" code to the "Draw GUI" event instead of the "Step" event. If there is a collision, you can then retrieve the exact 3D coordinate that it occurred at. SOLVED So the problem ended up being that I was checking if the mouse_x and mouse_y was between coords relative to the world, when I really needed the coords relative to the GUI. You are provided with a way to test for collisions on 3D triangles as well as infinite planes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |