AltairzShadow51 wrote:Well,You could add a camera change script?
SnowGecko wrote:I completely under stand what you are asking and would love to see this done more. You will. Probably need to set up a camera in the engine to do this using code so in third person you will actually see through the new camera.
the_grim wrote:Cryengine hides all attachments in the player character in the first-person view, and the default player model is built so that the base character is only an empty skeleton and ALL parts (shoes, legs, torso, hands, head) are attachments. This means that nothing will show in the first-person viewport. The player character in Crysis had the nanosuit legs as the base mesh and the upper body as attachment, so the legs would show in the FP viewport.
In order to display the player body in the free SDK you'd need to create a new player character which has the player model's legs (Objects/Characters/Agent/legs.chr) as the base mesh and the rest of the body as skin attachments. You can do this in the Sandbox character editor: open Legs.chr and then add the rest of the body as skin attachments and they should automatically be in the right place. Save the character (for example "player.cdf").
Then you need to open Scripts/Entities/actor/player.lua in Notepad and change "fileModel" and "clientFileModel" to your new character. (example: fileModel = "Objects/Characters/Agent/player.cdf"). You guessed it: this will tell the engine which model it should use for the player.
Last, go to Objects/Characters/Agent and make a copy of skeleton_character.chrparams and skeleton_character.cal and rename them to legs.chrparams and legs.cal. This will copy all the parameters that control the character's animations, from the base character that's in the default player model (skeleton_character.chr) to be used with the base character you used for the new player model (legs.chr).
Legs show fine and animations work, but because the shoes were a separate attachment (and were thus hidden) it looks like the player's legs are chopped off at the ankles. This means you need to model and rig your own player character that has complete legs.
An easier alternative is to use the third-person Gears Of Crysis (GOC) mode, and adjust the camera location so it's at the player's head position instead of being a couple meters back.
Use these console commands:
g_tpview_enable 1 (this enables usage of third-person view without having to press F1)
g_tpview_control 1 (this actually sets the third-person view)
g_tpview_force_goc 1 (this forces GOC mode which allows adjusting the camera position for an "over the shoulder" view - alternative is goc_enable 1)
goc_targetx 0 (default 0.5; camera is offset 0,5 metres to the RIGHT from the player)
goc_targety 0.3 (default -2.5 which would be 2,5 metres BEHIND the player)
goc_targetz 0.3 (default 0.2 I think, this means 0,2 metres HIGHER than the player head)
Enjoy! Please note that this alternative may cause clipping and glitches since the third-person animations are not completely in sync with the player camera movements. This is why you can't have goc_targety and goc_targetz at zero which would be the player head - due to third-person walking and running animations parts of the player body and head will occasionally show through the camera. Even with the settings above the body may clip through the camera when running or turning.
You can of course make a custom player model that has no head and hence won't cause clipping. Th player shadow will betray this cheat though.
Also note that the free SDK doesn't have proper animations for proning, so while you can go prone (Z) the player model will still be standing up which can look ugly when looking up at prone stance. The shadow shows the standing character even without GOC mode.
There are some downsides to this method, mainly stuff that won't work properly since you're not technically in first-person view anymore (for example aiming might be hard, and it's pretty much impossible to pick up small objects since the crosshair isn't exactly where you'd think it is) so if you're making a proper game it's advisable to use the actual first-person mode with a custom model instead of this hack.
tinypaperclip wrote:in the trackview editor set it as a loop to view through that certain camera, and to attach the camera to a bone you have to link it through a flowgraph. I'd go more indepth if it weren't 2 AM by now.