Use custom hidden ObjectManipulator to move entities

Was this article helpful?
1 out of 1 found this helpful

Comments

3 comments
Date Votes
  • Thank you for this example. 

    Is it possible to force the dragging only along one direction ? For example along a Vector3D direction. With this example the dragging is free while instead my goal is to be able to drag it only along a direction.

    Thank you.

    Keven Corazza

    2
  • I'm using this hidden object manipulator in my project and have set ShowTransformationLabel to false. But sometimes I can see a label appearing in the viewport and even after the object manipulator is disabled (by calling Cancel()), this label remains visible. What could be the reason?  I'm using version 2023.3.630.0

     

    1
  • @Keven. In order to restrict movement along a fixed direction you can do the following. Instead of choosing PickedEntity = Entities[0]; do PickedEntity = Entities[1]; Entities[1] is object manipulator's X direction arrow, by doing so you can restrict movement along  X direction. If you want a different direction (assuming in XY plane), then find the angle between Vector3D XAxis and your Vector3D. Prepare a rotation transformation and pass it as initial transformation in Enable(Transformation initialTransform, bool centerOnEntities, IList<Entity> entities). Now drag will happen only along your Vector3D. I guess Entities[3] is Y direction and Entities[5] is Z direction. You may choose PickedEntity as per your use case. Hope you got the point.

    1

Please sign in to leave a comment.

Articles in this section

See more