I am making a robot arm simulator and I need to split my window so I can show just the claw part of my robotic arm zoomed. I already followed some of the tutorials and created a new viewport, but the problem is that this arm piece is attached to other arm pieces, so when I attach my cameraNode to my the 3rd piece of my arm, it takes the main pivot point of it as reference.
My robot parts are attached like this:
nodePivot.attachChild(nodeBelts); nodeBelts.attachChild(nodeBody); nodeBody.attachChild(nodeArm1); nodeArm1.attachChild(nodeArm2); nodeArm2.attachChild(nodeArm3); rootNode.attachChild(nodePivot);
and then Im attaching a cameraNode to the 3rd arm like this:
camNodeUpview = new CameraNode("CamNodeUpview", camUpview); camNodeUpview.setControlDir(CameraControl.ControlDirection.SpatialToCamera); nodeArm3.attachChild(camNodeUpview); camNodeUpview.setLocalTranslation(new Vector3f(0, 10, 0)); camNodeUpview.lookAt(nodeArm3.getLocalTranslation(), Vector3f.UNIT_Y);
Here is how my camera is set up:
Here is where I would like to centralize my camera: