Pages: [1]
  Print  
Author Topic: Weapon model sway in camera movement  (Read 31078 times)
bbmario
Nub


Cakes 0
Posts: 21


« on: January 11, 2015, 06:59:15 PM »

I'm trying to create an effect similar to the one implemented in TF2: https://www.youtube.com/watch?v=4wPAzutIVpc

Note that this is not player model bobbing, it's just a subtle effect on the camera and the model itself, slowly reaching the new view target. I could not find any documentation on this topic around the internet and i suspect there's some heavy math behind this and it would be nice if someone here has any idea on how to implement that kind of code. Or, at least, can give me some good directions on the topic.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #1 on: January 11, 2015, 07:15:54 PM »

I totally understand what you're trying to do and it's also something I really want in OA too.  BTW this is totally a cgame thing, not engine, so I might move this.

It's a bit harder to implement since cgame handles the viewmodel very differently than Quake and all derivatives (Source engine included) afterward.  I tried to implement a port of Engoo's figure 8 bobbing (unreal-esque) in cgame in the leixperimental repository and failed.  I did however, manage to 'port' the old Quake bobbing code which goes well with a centered gun Smiley

Darkplaces has weapon swaying/leaning like Source fyi (cl_leanmodel / cl_followmodel), though I see it more as a Quake2 feature.   Generally the idea is to lowpass/highpass the old origin and angles instead of absolutely setting its value. Engoo partially implemented the Darkplaces code, but simplified and without low/highpasses (which I couldn't get to work).  for either engine, check view.c


The problem: In Q3, viewmodel is always 0,0,0.   In Q1, it's the vieworigin (coordinates being 22 units above the player's crotch in the map).  IIRC
« Last Edit: January 11, 2015, 07:39:24 PM by fromhell » Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
bbmario
Nub


Cakes 0
Posts: 21


« Reply #2 on: January 12, 2015, 04:42:21 AM »

Good research material i managed to find: http://docs.cryengine.com/display/SDKDOC4/Procedural+Weapon+Animations
Logged
Pages: [1]
  Print  
 
Jump to: