Hey all. I’m struggling to find the best way to store multiple mouse click locations and then recall that information later. For example, I want to create a program that requires you to click point one, show an image, click point two, show an image and then have both locations 1 and 2 stored. This process would then repeat over and over until the task is complete, where it would regenerate all locations 1 and 2 (this could be a lot of locations, say 200 mouse clicks max). It looks like using a raycast and storing the hit location in an array is possibly an option? However, I’m not finding a lot of supporting information to make that work. Is this the best way to store and recall mouse click location? Any guidance would be appreciated!
What you wrote here could work, 200 items in a list is nothing. But I would like to ask you to write about your goal. I mean the real one. Storing coordinates is just a way you’re planning to do something, but what is that something? What is the goal of this?
I’ll add some clarity to the task as well since that could affect this? So I have a person looking to throw a number of things toward a target. This program would then be used as a kind of a review process. So they would select what they were throwing and then select the intended location and the actual location for each object thrown. Essentially you would need what I think would be:
a toggle group for objects
and two arrays to store the intended location and the actual location
The goal would then be threefold
-
In the immediate highlight both of the clicked locations (intended and actual locations) before moving to the next throw.
-
Second, provide immediate feedback post-completion, displaying all intended and actual locations for the specific object types, possibly being able to see all of them or being able to toggle through and see only one group of them (all intended and actual for object type 1). A bonus would be providing distance of miss from actual to intended (I have a sized/scaled target).
-
The third would be having the ability to export this into a CSV.
Hopefully, this makes sense and helps clarify what I want to do.