check the markio demo, it has a skyboy and a player input handler.
basicly you need to create a player pivot, then create the camera with this pivot as parent:
player=createpivot()
camera=createcamera(player)
translateentity camera,0,-0.9,0
then inside the game loop you need to turn the PLAYER left and right, and look up and down with the CAMERA, this will prevent moving towards the sky when you walk forward while looking up.
of course, you need to move the PLAYER when you walk, run, strafe, jump etc.
basicly you need to create a player pivot, then create the camera with this pivot as parent:
player=createpivot()
camera=createcamera(player)
translateentity camera,0,-0.9,0
then inside the game loop you need to turn the PLAYER left and right, and look up and down with the CAMERA, this will prevent moving towards the sky when you walk forward while looking up.
of course, you need to move the PLAYER when you walk, run, strafe, jump etc.