We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Cloning and Picking

Home Forums Puzzles Cloning and Picking

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #36866
    Yuri KovelenovYuri Kovelenov
    Developer

    We checked our git logs, and it appears we did not change this specifically in version 3.5. I don’t know why is that. Looks pretty strange.

    Anyway, in our opinion, the behavior is correct for the following case: if nothing is picked then the picked object global variable is set to empty string.

    Still, I think you can easily reproduce the desired behavior by creating a variable puzzle and setting it to some object that you want to be saved as picked (or some object that was actually picked by the user). Then you can just update this variable only if the picked object puzzle returns not empty string.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #37252
    scalarescalare
    Licensee

    Hi Yuri,

    I noticed the same thing with 3.5 today (not the actual code in visual_logic.js) but the behavior. We used to have a functioning set of puzzles that used to have the clicked object stored in “picked_object” even if we did not use the “when_clicked” event, and now it does not, making our solution stop from working. We were using this for a configurator and we were monitoring if users clicked on an object to make the e-commerce solution to jump to the step associated with that object. Now that jump is not working after updating/saving the puzzles.

    Please help! Thank you.
    Andrés

    #37270
    Yuri KovelenovYuri Kovelenov
    Developer

    Hi Andrés,

    If you believe this is a bug, could you create a simple project for us to debug? Thanks.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #37310
    scalarescalare
    Licensee

    Not necessarily a bug, but certainly something that works differently from earlier versions. I have to admit I’m not sure if this changed from 3.5 on, or it was already present in previous versions. I have been working on projects that did not involve verge3D for a long while (most of past year). I decided with the new year that it was about time to update older projects (locally first, of course) to the latest stable version and after updating I noticed that this functionality had ceased to work, and when looking for related issues I found this post.

    I’ll create a reduced project that instead of calling our external javascript functions associated with the configurator steps will just print some messages to console, so you can test that with 3.5 and earlier versions. The whole thing is also related to my old post related to dragging and clicking: https://www.soft8soft.com/topic/clicking-vs-dragging/#post-27750

    Stay tuned, thank you.
    Andrés

    #37320
    scalarescalare
    Licensee

    OK, here is the reduced project. As you can see, the coding is able to differentiate dragging from clicking, and it also is aware of clicks that are released with a delay. The puzzles used to call the (currently disabled in the puzzles) external “move_to_step” javascript function when the picked object matched one of the objects in the two collections listed (BEDS and MATTRESSES), but now, since picked_object is always null nothing happens. It just logs to the console that a click was identified, and it was different from a camera drag, but then it cannot identify which collection was clicked on.

    I hope this helps. Thanks a lot in advance!

    #37321
    scalarescalare
    Licensee

    Oops, sorry about that. It seems the zipped file is slightly larger than 4MB. I just uploaded it to our server: http://normalcreatures.com/picked_object/click-drag.zip

    Thank you!
    Andrés

    #37468
    Avatarjdock
    Licensee

    Yuri,

    Is there an issue if you added the functionality to the ‘when clicked’ event to return the mesh object name in PickedObject even if it is not the target of the When Clicked event? I know it is not the intent of the When Clicked, but it was how it worked prior to 3.5.

    If this is not possible, maybe some help developing a ‘Get Picked’ puzzle. The issue is really for projects like mine where a lot of cloning is involved and an elegant way of interacting with the cloned objects is needed. Basically I need a puzzle to just return PickedObject no matter what mesh is picked. This avoids creating a bunch of When Clicked events for each clone. I used conditions based on the mesh name to determine actions. If you are careful with the mesh names (like using a . at the end of the name) the clone name is predictable.

    Thanks,
    Jon

    #37471
    GlifTekGlifTek
    Licensee

    Hi,
    So let me get this straight Jon.
    You want to return only the “name”, not the actual js object of ANY object you click? Is that correct?

    #37473
    Avatarjdock
    Licensee

    Correct – I believe just the object name will work. A few post in this thread I show how I modified the visual_logic.js to get it to work. I believe what I did there just returns the name, not the actual js object. This workaround works, but I want to avoid editing the visual_logic code if possible.

    Thanks,
    Jon

    #37508
    GlifTekGlifTek
    Licensee

    try using the “create text with” puzzle in the text section.
    go into the gear setting and remove one block so there’s only one input then put it between a set variable and picked object.
    then print to console the variable.

    that’s an easy trick. if you want you can always just go get it …
    you could set the picked object to a variable pickedObj then toss that variable into the exec code puzzle and get it’s name there. ie:

    VARS[‘pickedObjName’] = VARS[‘pickedObj’].name;

    • This reply was modified 2 days, 23 hours ago by GlifTekGlifTek.
Viewing 10 posts - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.