Adding Groups to Scene during Runtime and Question about pivot points
I've used j3d in which nodes can be added/detached to and from branchgroups during runtime with a capability set. Is the same thing possible in javaFX to add/remove nodes to groups or to add/remove groups to and from the scene during Runtime?
Also an unrelated issue:
I'me trying to scale a node around the pivot point of the midpoint in a scene however the node can be translated freely based on mousedrag. Here is the code to get the pivot point:
var point = target.sceneToLocal(stageWidth / 2, stageHeight / 2);
var pivotX = point.x;
var pivotY = point.y;
and then of course:
target.transforms = Transform.scale(scaleX, scaleY,
Now I know I have the correct index for the .transforms[i] but I get strange behavior. As long as I have not translated the node yet I can scale the node perfectly. But after translating the node in some direction I get vary odd pivot points. If I zoom in my points tend to oscillate between two points then converge to a point that is usaully offscreen. When zooming out the same activity occurs except the points diverge until the node is offscreen. Any thoughts on what I'm doing wrong? Or maybe a possible bug?