• Proof of concept - First person body view (Need help too)
    41 replies, posted
[hd]http://www.youtube.com/watch?v=92GJN7511X8[/hd] Skip to 0:55-1:00 for what this thread is about. Everything else is just stuff to make the video longer. So basically Lord Ned and I were thinking about making a mod, and he had the bright idea to have the player actually extend his hands and do stuff, like in the video, turning a valve. Seemed like a cool idea, because there's a few other games that do it (Like Bioshock) and it gives it more depth in the game. So, to create this, we simply took a male model's skeleton, and stuck the "hands" model onto that skeleton. Now you might ask "Well, why did you need the whole skeleton?". Simple, more control. With the spine + head bones attached, we can parent a viewcontroller to the invisible head, and can control the player's view (like going from side to side, up and down, etc.). [b]Now here's what I need help on, and why I posted this in the mapping section[/b]. I need to find a way to get the player's view to smoothly go into the position of the viewcontroller. If you watch the whole video, you'll see right before the animation the view goes flying out of the map. This is because the viewcontroller's "start at player" option is completely fucked up. I need to find a way to achieve the same effect, but I'm unsure how. Any thoughts? I know the animation is kinda cheezy, but as the title states, it's just a proof of concept. I'm open to suggestions for puzzles and actions that can require this, because it's really cool.
Why could you not just attach the normal everyday player camera to the head of the player model (while rendering yourself, so you see legs etc as well all the time)? You hit more than 2 birds with one stone by doing that. But I guess it is a bigger change.
[QUOTE=Pj The Dj;16744583]Why could you not just attach the normal everyday player camera to the head of the player model (while rendering yourself, so you see legs etc as well all the time)? You hit more than 2 birds with one stone by doing that. But I guess it is a bigger change.[/QUOTE] Because player models are so fucked up because Valve never used them in singleplayer games. Too much work to get them to always render and such.
Because neither of us can code to save our lives and that's not a simple piece of code you're talking about? :)
[QUOTE=Lord Ned;16744965]Because neither of us can code to save our lives and that's not a simple piece of code you're talking about? :)[/QUOTE] That.
I managed to get the grey default single player model to dynamically cast shadows in first person, as well as show itself. But my god, did it fuck up so many other things.
Instead of the 'scientist' being deleted and replaced with a ragdoll (which you can clearly see), try just making him die in his chair.
[QUOTE=esrande;16745886]Instead of the 'scientist' being deleted and replaced with a ragdoll (which you can clearly see), try just making him die in his chair.[/QUOTE] It's a placeholder for a real animation.
it's not too hard (set animation if they player is 'using' something) to code. i can help you if you have all the animations done already. a simple trace/ent check can be done to see what animation to play biased on if you are pressing a button or turning a wheel.
Yeah but you'd have to switch over to the v_hands model... They'd have to be in the right position or it wouldn't grab the wheel the right way. That and testing means loading up a mod. :v
Try a custom vehicle instead, that's what valve did in ep2. It will create the smooth camera movement seen when entering any vehicle in hl2.
[img]http://i157.photobucket.com/albums/t62/danharibo/dm_bridge_b20007.jpg[/img] Some progress for such a thing was done in now in permanent hiatus mod Project Fedora.
Which of course won't release it's code so uh...
Actually I think we could. [editline]07:52PM[/editline] Our coder is searching for it right now to give to you guys.
If I can get to my computer without dying I'll put the code somewhere It's pretty crap though so It'll need some work in places
Oh wow. Thanks a ton. I'm no expert in C++ but I'll give it a shot. :P Danharibo: [url]www.pastebin.com[/url] is fine, uploading it to filefront is fine, wherever.
[url]http://razor-studios.co.uk/files/omgfbawtf.rar[/url] this should be it, they go in \src\game\client and may or may not kill you.
Sign me up for the may or may not kill you part! Does it work off of the latest OB update or is it still built on the old OB code?
[QUOTE=Lord Ned;16759771]Sign me up for the may or may not kill you part! Does it work off of the latest OB update or is it still built on the old OB code?[/QUOTE] I can't remember, I think it's on the OB code. If it isn't where you need it i'll try and port it
If I get it working, mind if I post it on the VDC? That way we can share the knowledge. (With credit to you guys of course)
[QUOTE=Lord Ned;16759969]If I get it working, mind if I post it on the VDC? That way we can share the knowledge. (With credit to you guys of course)[/QUOTE] yeah sure, it could only benefit from improvement
[QUOTE=danharibo;16760009]yeah sure, it could only benefit from improvement[/QUOTE] If this was every coder's attitude a hell of a lot more would be accomplished.
Instead of "OH WE MAKE COOL SOURCE MOD WITH NEAT FEATURES." *Months later* "Oh man no one is interested in it anymore" *code fades to the bottom of the coder's harddrive, features are never released for the public*".
[QUOTE=Lord Ned;16744965]Because neither of us can code to save our lives and that's not a simple piece of code you're talking about? :)[/QUOTE] Well, I don't know about hard, but fair enough. You should though, if you want to make a mod. But also, no offence but I don't really think your idea will work too good. If the arms are static then the camera will just tween onto them and it will look kinda silly, especially considering from where you can activate a button.
I don't think you read the thread at all PJ... The whole idea was to blend into the right spot so that it DOESN'T look odd.
[QUOTE=Pj The Dj;16760678]Well, I don't know about hard, but fair enough. You should though, if you want to make a mod. But also, no offence but I don't really think your idea will work too good. If the arms are static then the camera will just tween onto them and it will look kinda silly, especially considering from where you can activate a button.[/QUOTE] Since the mod appears to be just default HL2 style gameplay, with added features, coding will probably be managable with VDC code snippets and common sense. The rest is in the mapping and content.
Well... Fedora's code didn't eat me. [img]http://i25.tinypic.com/nltt05.jpg[/img] Appears to be failing to set the player model. Gonna debug now.
Namelezz or I speel good should have the player model we used.
It doesn't matter. It should still try to use the rebel model instead of player.mdl. Does this still use first person models for weapons? If so, did you guys get around to rigging it so that your weapons hands matched the first person body? (I assume this could be done by animating the bones as if the FBA was there, and then having the FBA use the animation for those bones.) Would probably require blending and other things.
[QUOTE=Lord Ned;16761076]It doesn't matter. It should still try to use the rebel model instead of player.mdl. Does this still use first person models for weapons? If so, did you guys get around to rigging it so that your weapons hands matched the first person body? (I assume this could be done by animating the bones as if the FBA was there, and then having the FBA use the animation for those bones.) Would probably require blending and other things.[/QUOTE] It used the 1st person model, I never got around to making it look right. And you might want to make your own rebel model or the head might pop in/out of view as it bobs around
Sorry, you need to Log In to post a reply to this thread.