Im trying to make my third person camera an over-the-shoulder type view such as Ghost Recon 2. This third person camera is implemented, where and how do i offset the view?
RightView Fix in the CFG file! Important!!
Just found the problem with the camera being placed to the right of the player. It seems that the mentioned fix doesn't work if you have already run your mod before. This is because the 90 degree value for cam_idealyaw gets saved to a config file. The config file can be found in Steam\SteamApps\SourceMods\MY_MOD_DIR\cfg\config.fcg. You can open it up and change
Or if you're realy lazy and don't mind loosing your key-bindings and other configurations, just delete it so it gets regenerated.
--Sunblaze 18:53, 19 Jul 2005 (PDT)
Yah, I forgot to mention that. I added it in. --SubKamran 20:32, 19 Jul 2005 (PDT)
Probably not the right place for this, but I couldn't find any other suitable page.. I've successfully implemented third-person camera, and constructed an entity that can change the player model on the fly. But the player model won't do any animations, it just floats which is really annoying. Does anyone know how to make the player do some animations? --.freelancer 13:23, 29 Nov 2005 (PST)
- I can't help you with this, but to help those who can, you might need to say what you've tried and what method you use to change the player model. —Maven (talk) 17:08, 29 Nov 2005 (PST)
- Since I'm rather new to the Source engine I haven't tried much to get the animations working, I really don't know how to start. To change the model I get a pointer to the local player (with UTIL_GetLocalPlayer()) and use the SetModel function. Since the model needs to be precached, the model has to already be somewhere in the map. --.freelancer 01:31, 30 Nov 2005 (PST)
- It's a single-player mod..--.freelancer 07:26, 1 Dec 2005 (PST)
- Eh. Perhaps that will teach me not to ask rhetorical questions. —Maven (talk) 17:59, 1 Dec 2005 (PST)
@Ts2do: I know how to switch model, that's not the issue. The problem is the new model is only using one animation (if you could even call it that), just like the original player.mdl... --.freelancer 01:54, 2 Dec 2005 (PST)
- Do I still have all of the SP code available? I know visual stuff like materials and models won't be available..--.freelancer 10:48, 2 Dec 2005 (PST)
- Yeah, probably. Still don't really know where to look though.. --.freelancer 13:15, 2 Dec 2005 (PST)
Materials and models? You can treat it like it was a SP mod still by utilizing the hl2 base content... how are you doing animations in the player mdl? are you using the male_anim and female_anim or whatever it is...that will only work in MP coz that's what the file is in
- So basically it would be easier just to create the mod with the MP SDK? Right now I haven't changed anything about the animation system, that's why the player mdl isn't using any animations. That's what I need help with. But using the MP SDK would make that possible more or less without any extra coding? --.freelancer 03:25, 3 Dec 2005 (PST)
Well...Eclipse did it without any MP code I think...try checking out their player mdl
- Let's see if I got this right. If I use SP SDK my player animations won't work without lots of coding, and if I use MP SDK my NPC animations won't work without lots of coding? Maybe I should just make the mod first-person.. --.freelancer 17:12, 3 Dec 2005 (PST)
With this tutorial, I borrowed the Eclipse player model. The jump animation works, as well as the IDLE animation. In the code there is a place where animations are defined... I didn't mess with it enough to see if I could get the run animation working. But you basically reference the animation in player.mdl. You could also head to the Eclipse forums and send them a PM; PM the programmer "Resforjen." He was the one who got the animations in and working. --SubKamran 07:10, 25 Feb 2006 (PST)
There was a post in VERC about how to add animation in thirdperson view to a single player mod. Will this help? -n-neko 07:54, 25 Feb 2006 (PST)
I tried to implement a third person camera that works just like the "free chase cam" known from many mods. "Free" means you can look around with the mouse, but the player model doesn't rotate to where you look at. I dug into all code related to player entities and camera movement. At some point the view angles of the player get synchronized with the angles of the player model, but I couldn't find it. :/ -- Koraktor