Add a model or character to a fly cam

I need to add a model or character(hand + gun) to a fly cam like the one in the counter strike game…can anyone help me or maybe link me to a tutorial where this subject is covered?

Other way around, programm a player object that can walk and attach a Cameranode to it’s head.



I suggest first taking a good look at the testprojects as they show quite much basics and also some concepts you might need.

thanks for your help its the attachement to the head part i’m worried about do i have to know the exat coordinates of the head to be able to do so?

make bone in blender



cam.setLocation(node.localToWorld(bone.getModelSpacePosition(), null));

two ways,



either you read it out of the model via animation stuff (I’m not familair with this)

or you simply know how tall a character is ans where the middlepoint of your model is.

In my game all player characters have their feed at 0,0,0. so if I know they re 1.8 m tall I attach the camera node with localtranslation 0,1.8,0 to the character.