Home › Forums › General Questions › Measure distance between objects
- This topic has 8 replies, 4 voices, and was last updated 8 months, 2 weeks ago by kdv.
-
AuthorPosts
-
2019-05-30 at 10:17 am #15094chiduParticipant
Hi,
Is it possible to measure distance between the objects in Verge3D? It will be helpful in Architectural applications.
Chidanand.G
2019-05-30 at 10:43 am #15099Mikhail LuzyaninStaffIs 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.
2024-03-08 at 11:15 am #71411mrgnaParticipantCan 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.2024-03-08 at 4:46 pm #71419kdvParticipantremove 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.
2024-03-08 at 9:25 pm #71430mrgnaParticipant2024-03-08 at 10:30 pm #71434kdvParticipantCould it be because the variables are arrays?
You are trying to get the distance between two arrays of objects? 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.
2024-03-09 at 12:01 am #71435mrgnaParticipantSorry, Im not very good at coding so I don’t really know how to explain the issue
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
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
- 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.2024-03-09 at 12:22 am #71441mrgnaParticipantSorry, Im not very good at coding so I don’t really know how to explain the issue
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
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
Sigh… I was missing something stupid.
Nevermind, ignore all of this please.
2024-03-09 at 12:59 am #71442kdvParticipantWhy 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
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.
-
AuthorPosts
- You must be logged in to reply to this topic.