Adding new object at mouse location
Hopefully someone can point in the right direction.
I am trying to add a sphere into the canvas3d but not at the origin. I want it where I click the mouse within the canvas. I figure I would need to create a transform group that translate according to the mouse coordinate and apply it to the sphere before inserting into a branch graph.
My problem is that I am not sure how to get the mouse coordinate. The sphere is inserted when I click on a menu option from my swing gui. so far so good but where do I insert my mouse listener and make it a prerequisite for the sphere insertion.
Any suggestion would be much appreciated.