My code is as below.
Basically my problem is that, following the documentation, i get stuck because neither the capsule shape nor the CharacterControl have an attachChild() function
the xxxx is where ‘player’ would be in the documentation (called’ target’ there)
(my apologies if this looks like a double post, the forum may or may not have glitched on me, i cant find my first try under my account tab)
player.setJumpSpeed(30); player.setFallSpeed(30); player.setGravity(30); player.setPhysicsLocation(new Vector3f(-25, 575, -25)); bulletAppState.getPhysicsSpace().add(player); flyCam.setEnabled(false); camNode = new CameraNode("CamNode", cam); camNode.setControlDir(ControlDirection.SpatialToCamera); camNode.setLocalTranslation(new Vector3f(0, 300, 0)); camNode.lookAt(player.getViewDirection(), Vector3f.UNIT_Y); xxxxx.attachChild(camNode); }</div>