Thu, 03/31/2022 - 13:28
Forums:
Try to override ProcessDragging by simply translating the object to mouse position.
I figure to do so I need the AIS_InteractiveObject and set its location.
So the question is how to get the AIS_InteractiveObject or PrsMgr_PresentableObject from SelectMgr_EntityOwner? or maybe there is another way to set its location in the ProcessDragging function?
Thu, 03/31/2022 - 15:02
ProcessDragging is the method of AIS_InteractiveObject itself (AIS_InteractiveObject::ProcessDragging()), so I don't quite understand which problem you are trying to solve.
As for SelectMgr_EntityOwner, it keeps reference to SelectMgr_SelectableObject - see method SelectMgr_EntityOwner::Selectable(), which you may DownCast() to your interactive object class.
Thu, 03/31/2022 - 16:37
thankyou, what you provided works.
I have an another question through. The SelectMgr_EntityOwner does not move with the translated object. so after AIS_DragAction_Stop, you cannot select the object again. Also, after a while when you can select it, it start where the SelectMgr_EntityOwner originates.
I looked at the SetLocation function and it does nothing. Do I have to implement it or is there another way to have it move with the object at end of drag action?