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.

Limit number Cloned Objects

Home Forums Puzzles Limit number Cloned Objects

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #52292
    greg
    Participant

    I want the user to be able to add a specific number of “cloned” objects to the scene. In the example linked here, the user can double click on the window to clone it, but I need to limit the number of “Clones” to 3.

    I also dont want the customer to be able to move the window off of the wall. They must be kept between the trim. The Windows can be moved along the x by dragging.

    Any suggestions would be greatly appriciated.
    The example can be found at https://v3d.net/7a8

    #52420
    xeon
    Customer

    Hey Greg,
    As you create clones, create a list of the objects created.
    Then you should have a variable set as the max number of clones you want. Once the count in the list reaches the variables disable the ability to create more clones. The list will be handy to delete, and or hide those clones as well.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #52421
    xeon
    Customer

    Regarding keeping an object within the bounds of a wall. There are three.js bounding boxes you can use via JS that makes this easier but here is puzzle only version:

    https://v3d.net/7ls

    The application/code and blend file has been sent to your email.

    For those that stuble upon this the trick is using the location constraint in Blender. That will confine it to the wall.

    Adding windows on a wall such that they don’t overall will be the next question. See puzzle image for details.

    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #52812
    rampagedog
    Participant

    How to let the puzzle read a config file and set the max clone number depending on the config file?

    #61006
    bigmike814
    Customer

    that’s looking good. How are you controlling the clones? Or are you just writing in the “name” like name1, name2, etc?

    #61007
    kdv
    Participant

    but I need to limit the number of “Clones” to 3.

    A simple counter will do

    I also dont want the customer to be able to move the window off of the wall

    Add a constraint

    Puzzles and JS. 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 meaning at all.

    #61010
    bigmike814
    Customer

    KDV,

    Are you interested in helping me out? I need to get my project finished and am running out of time. I have a few things I need to dial in and am willing to pay you for your consultation. If you are interested, I can send you what I am stuck on and you give me a price for helping me out if it is something you can help walk me through.

    #61011
    kdv
    Participant

    contact me kdv[at]izh[dot]com

    Puzzles and JS. 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 meaning at all.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.