protected AssetManager assetManager;
protected Quaternion headRot;
protected Listener listener;
public Player(World world, InputManager input, Camera cam, Listener listener, Hector hull) {
Incarnator incarn = world.getIncarnator(0);
this.listener = listener;
this.world = world;
assetManager = world.getAssetManager();
inputManager = input;
hector = hull;
player = new CharacterControl(hector.getCollisionShape(), .1f);
player.setJumpSpeed(PLAYER_JUMP_SPEED);
player.setFallSpeed(PLAYER_FALL_SPEED);
player.setGravity(PLAYER_GRAVITY);
player.setCollisionGroup(PhysicsCollisionObject.COLLISION_GROUP_01);
player.setUserObject(this);
walkAngle = incarn.getStartAngle();
hector.getHectorNode().addControl(player);
camNode = new CameraNode("PlayerCam", cam);
camNode.setControlDir(ControlDirection.SpatialToCamera);
camNode.setLocalTranslation(Vector3f.ZERO);
camNode.lookAt(Vector3f.UNIT_Z, Vector3f.UNIT_Y);
hector.getHeadNode().attachChild(camNode);
// aureus: temporary solution; scout should ultimately be a separate object
scoutNode = new Node();
scoutNode.setLocalTranslation(new Vector3f(0.0f, 3.0f, -10.0f));
Matrix3f scoutMatrix = new Matrix3f();
scoutMatrix.fromAngleAxis((float)Math.atan2(3.0f, 10.0f), Vector3f.UNIT_X);
scoutNode.setLocalRotation(scoutMatrix);
hector.getLegsNode().attachChild(scoutNode);
player.setPhysicsLocation(incarn.getLocation());
headRot = new Quaternion();
setupKeys(input);
}