controlScheme.setCharacter(avatarCharacter);
// Chain the camera processor to the avatar motion processor for
// smooth animation. For animated avatars we use CharacterAnimationProcessor for the simple
// avatar CharacterProcessor
ProcessorCollectionComponent pcc = avatarCharacter.getComponent(ProcessorCollectionComponent.class);
ProcessorComponent characterProcessor = null;
ProcessorComponent characterAnimationProcessor = null;
for(ProcessorComponent pc : pcc.getProcessors()) {
if (pc instanceof CharacterProcessor)
characterProcessor = pc;
else if (pc instanceof CharacterAnimationProcessor) {
characterAnimationProcessor = pc;
break;