Rotate and move transform
#7
Solved!
I add transformation on modelmoved handler and not on modemovedstarted and it works.
Here is the code
Code:
 Sub rotatedmove(ssender As Object, args As ModelMovedEventArgs)

       _offsetx = args.MoveVector3D.X - _offsetx_prec
       _offsety = args.MoveVector3D.Y - _offsety_prec
       _offsetz = args.MoveVector3D.Z - _offsetz_prec
       Dim rotatetransform As New TranslateTransform3D(_offsetx, _offsety, _offsetz)
       Dim mygroup As New Transform3DGroup
       If mymodelmover.Transform Is Nothing Then
       Else

           mygroup.Children.Add(mymodelmover.Transform)
       End If

       mygroup.Children.Add(rotatetransform)


       mymodelmover.Transform = mygroup
       ' Dim translatetransform As New TranslateTransform3D(_offsetx, _offsety, _offsetz)
       _offsetx_prec = args.MoveVector3D.X
       _offsety_prec = args.MoveVector3D.Y
       _offsetz_prec = args.MoveVector3D.Z
   End Sub
  


Messages In This Thread
Rotate and move transform - by kreativasas - 06-22-2020, 04:32 PM
RE: Rotate and move transform - by abenedik - 06-23-2020, 05:06 PM
RE: Rotate and move transform - by kreativasas - 08-04-2020, 04:25 PM
RE: Rotate and move transform - by abenedik - 08-05-2020, 08:55 AM
RE: Rotate and move transform - by kreativasas - 08-05-2020, 10:40 AM
RE: Rotate and move transform - by abenedik - 08-05-2020, 06:39 PM
RE: Rotate and move transform - by kreativasas - 08-10-2020, 10:37 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)