ive written drag n drop logic in 2d based engines and its usually something like :
// on click
DragOffset = Mouse_World_Position - Object.Location;
// while moving in the update tick
Object.Location = Mouse_World_Position - DragOffset
ish
i tried something similar in blueprints :
// onclick
DragOffset = ConvertMouseLocationToWorldSpace() - HoveringActor.Location;
SelectedActor = HoveringActor;
// while mouse is held and update(dt)
SelectedActor.Location = ConverMouseLocationToWorldSpace() - DragOffset
this works, but the object only moves a little bit
i assume ive missed something in regards to the mouse’s world position (projection/deprojection stuff)
any pointers?