@SGaist Possibly yes... I'm back to this & lost again... I think I figured out the last problem without needing it, but now I need it again...
Scenario = bezier curve, 4 points, first start, control left, control right, endpoints.
Start and end can never cross each other on Z-axis.
Control left can not pass end on the Z-axis and control Right can not pass start on z-axis either.
Control points are children of start/endpoints.
(Hope this make sense...)
So what I need to find out is... location of End point while being inside Control Left event. I need to somehow map scenePos() of End point to my Control Left local space....
here is some debuging I was trying to do...
(test case, moving right control point towards left Start item)
targetPos : QPointF(348,-478) // scenePos() of Start item
myPos : QPointF(336,-617) // scenePos() of rightControl scenePos() - already invalid position because we passed the Z location of targetPos item.
myLocPos : QPointF(-237,2) This should match other item loc at some point... localPos of rightControl
mapFromScene: QPointF(12,139) // mappings
mapToItem : QPointF(113,-477) // mappings
mapFromItem : QPointF(583,-479) // mappings
one of mappings should return a number close to myLocPos but none of them do :- (
Debug code :
qDebug() << "oh snap!" <<
"\n targetPos : " << itemPos <<
"\n myPos : " << myPos <<
"\n myLocPos : " << newPos << "local pos of rightControl item" <<
"\n mapFromScene: " << mapFromScene(itemPos) <<
"\n mapToItem : " << mapToItem(items[x], itemPos) <<
"\n mapFromItem : " << mapFromItem(items[x], itemPos);
Esentially this :
699607e4-2d41-4882-93a8-4b62531390a6-image.png
Top left item, is the myPos/newPos variable newPos being local and myPos being scenePos(), item below is the "Start"