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.

Measure distance between objects

Home Forums General Questions Measure distance between objects

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #15094
    chidu
    Participant

    Hi,

    Is it possible to measure distance between the objects in Verge3D? It will be helpful in Architectural applications.

    Chidanand.G

    #15099

    Is it possible to measure distance between the objects in Verge3D? It will be helpful in Architectural applications.

    It’s possible with Get Distance Puzzle, but it measure distance between origins, so got get distance between corners you will need to set an apty to the corner of the object and measure distance between this emptyes.

    Co-founder and lead graphics specialist at Soft8Soft.

    #71411
    mrgna
    Participant

    Can someone please help me understand why this is not working correctly? I have linked the puzzle I am using, as well as the output.

    I am using javascript to get the names of the objects that are being used in the pictured example… But how do I get a numerical output instead of just text?

    Attachments:
    You must be logged in to view attached files.
    #71419
    kdv
    Participant

    remove the “create text” puzzles.

    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.

    #71430
    mrgna
    Participant

    I tried that already :(

    Here is the output with the modification you mentioned:

    Could it be because the variables are arrays?

    • This reply was modified 8 months, 2 weeks ago by mrgna.
    Attachments:
    You must be logged in to view attached files.
    #71434
    kdv
    Participant

    Could it be because the variables are arrays?

    :wacko: You are trying to get the distance between two arrays of objects? :scratch: That puzzle can measure the distance between two objects only.

    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.

    #71435
    mrgna
    Participant

    Sorry, Im not very good at coding so I don’t really know how to explain the issue :mail:

    From the javascript I have written, I push the object name into an array when someone clicks on the div to set it as either “Measure Object 1” or “Measure Object 2”. From there I am hoping to use the string in that array to reference to an object in the scene.

    I have attached some photos of the green div buttons I am talking about clicking, and a snippet of my code so you can see how I am moving the info around. Im clearly doing something wrong as my output is always text :scratch:

    But even with all this, since the array has the correct text (the previously printed console text)- shouldn’t it work anyways when I try to refer to an object by the array? I feel like I am missing something very obvious :unsure:

    • This reply was modified 8 months, 2 weeks ago by mrgna.
    • This reply was modified 8 months, 2 weeks ago by mrgna.
    Attachments:
    You must be logged in to view attached files.
    #71441
    mrgna
    Participant

    Sorry, Im not very good at coding so I don’t really know how to explain the issue :mail:

    From the javascript I have written, I push the object name into an array when someone clicks on the div to set it as either “Measure Object 1” or “Measure Object 2”. From there I am hoping to use the string in that array to reference to an object in the scene.

    I have attached some photos of the green div buttons I am talking about clicking, and a snippet of my code so you can see how I am moving the info around. Im clearly doing something wrong as my output is always text :scratch:

    But even with all this, since the array has the correct text (the previously printed console text)- shouldn’t it work anyways when I try to refer to an object by the array? I feel like I am missing something very obvious :unsure:

    Sigh… I was missing something stupid.

    Nevermind, ignore all of this please.

    #71442
    kdv
    Participant

    Why do you save an object’s name as an array consisting of one element only? What’s the point? Just save it as a string.

    I feel like I am missing something very obvious

    Try this way:

    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.

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