1

I want to add transparency to Objects (without loosing the Click-Event). Google told me to try SortingVisual3D. Without SortingVisual3D everything (except transparency) worked well, Click-Events also.

Now i tried to implement it (simplified code):

Public SV3d As New HelixToolkit.Wpf.SortingVisual3D
Public Model3DUI As New ModelUIElement3D

'Apply geometry
    Model3DUI.Model = geometry 'skipped geometry code in this post
'Add Click Event
    AddHandler Model3DUI.MouseLeftButtonUp, AddressOf ClickEvent
'Add to SortingVisual3D
    SV3d.Children.Add(Model3DUI)
'Add to ViewPort
    Viewport.Children.Add(SV3d)
'Setup SortingVisual3D
    SV3d.SortingFrequency = 2
    SV3d.Method = HelixToolkit.Wpf.SortingMethod.BoundingBoxCorners
    SV3d.IsSorting = True

Basically it works fine, everything renders as it should and transparency is working too. But for some reason now the Click Event doesn't work. Anybody has an idea what i'm doing wrong?

I'm not very experienced with Helixtoolkit, so it could be that my way is completely wrong.

j__
  • 63
  • 2
  • 9
  • I got the same problem. I have tried to find solution but the result is the same using SortingVisual3D . If you solve the problem, it would be a good idea to share the solution ! – Zoran Zoki Jul 16 '21 at 13:55
  • Hey @ZoranZoki, unfortunately I still do not have a solution :( – j__ Jul 19 '21 at 10:57
  • This is the solution https://stackoverflow.com/a/68471853/1566241 – Zoran Zoki Jul 22 '21 at 18:30

1 Answers1

0

First create SortingVisual3D, after that at the beginning add the visual clickable objects and at the end add the transparent object, with the hit test visible set to false ! This worked for me !

Zoran Zoki
  • 128
  • 7