I want to get the coordinates from a point in the viewer (newest version) after clicking, but it seems it has been changed from the previous version of the viewer.
SDV.addListener(SDV.EVENTTYPE.INTERACTION.SELECT_ON, (e) => {
addPoint(e);
});
.
var addPoint = function(event) {
console.log(“add point”);
pickPoint = event.selectPos;
.
I can’t get a selectpos from the event, while in previous versions that was the way.
https://support.shapediver.com/hc/en-us/articles/360030890392-Tutorial-Pick-and-Drag-Points-on-an-Object
Any help?
Hey @Robin_van_Wijk,
sorry for the late replay, we had quite a few holidays in the last weeks.
I just deployed a new viewer version 2.0.9
that now also exposes the intersectionPoint
in this event.
Please let me know if that is all you need, if not, we can always expose more there!
Cheers, Michael
Hi Michael,
Sorry, we were closed for holidays last weeks.
Thanks for the development. We are going into it, to see if we can work with this.
We’ll keep you posted.
Regards, Robin
The solution works for when the viewport is in 3D perspective. It returns the right coordinates.
But when is set the viewport in view from the top, i get weird coordinates which seems to be related to the zoom level.
Can you take a look at it?
Thanks in advance.
Hello @Robin_van_Wijk,
thanks for letting me know about this. I will investigate it and will come back to you with solution within the next few days!
All the best, Michael
Hello @Robin_van_Wijk,
I just deployed viewer version 2.3.0
in which this issue should be fixed.
Cheers, Michael
Hi Michael,
I updated the viewer to 2.3.0 and it fixed the issue. Thnx for your work.
Kind regards