- This topic has 4 replies, 2 voices, and was last updated 2 years, 3 months ago by
kitt.
-
AuthorPosts
-
2023-07-18 at 11:47 am #65299
kittCustomerHeya,
(Sorry if this is a repost, I can’t tell cos I can’t find my first topic anywhere)
I’m having some trouble with selecting/deselecting 3D objects. I have a grid of planes set up in the 3D space, and various objects. When the user clicks on an object and then a grid square, I want the object to move to the x and y coordinates of that grid square. I have the planes in a ‘group’ in blender, and I am using the ‘picked object’ puzzle to determine which grid square the object moves to. So far so good.
What I have trouble with is deselecting the object. For some reason, when I select a second object and another grid square, both that and the first object move. No matter how many object I select, they all move. How can I get it so that it deselects the first object so only one moves at any time?
Things I have tried so far, to no avail:
Selecting a HTML icon instead of a 3D object.
Making a list of 3D objects to move and choosing the object at a number in the list.
Making an empty list and adding 3D objects at first/last and then moving only first/last.Attached a few example screenshots of different puzzle setups. Any and all help you can offer would be amazing!
2023-07-18 at 1:58 pm #65303kdv
Participant
Nothing else.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-18 at 2:20 pm #65305
kittCustomer
Nothing else.
But I need the user to select one of many items first before selecting a grid square. And the way I’ve set the puzzle up works, but it moves all selected objects, rather than the most recently selected objects, and that’s the issue I’m trying to solve.
2023-07-18 at 2:29 pm #65306kdv
ParticipantOk. Easy.

You should understand that the
when clickedpuzzle is not an action function, it’s an event listener. It registers actions for chosen objects.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-18 at 2:47 pm #65308
kittCustomerThank you so much! That solved it.
I had an inkling that the selected object would need to be saved as something (be it variable or list or something else). Clearly I was going down the wrong rabbit hole with the lists.
Cheers again
-
AuthorPosts
- You must be logged in to reply to this topic.


