Quake3World.com
https://www.quake3world.com/forum/

Weapon model sway in camera movement
https://www.quake3world.com/forum/viewtopic.php?f=16&t=50784
Page 1 of 1

Author:  vinny [ 01-05-2015 03:19 AM ]
Post subject:  Weapon model sway in camera movement

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. Thanks! :D

Author:  vinny [ 01-09-2015 04:27 AM ]
Post subject:  Re: Weapon model sway in camera movement

Any ideas? :D

Author:  Ganemi [ 12-29-2016 09:25 PM ]
Post subject:  Re: Weapon model sway in camera movement

Something similar to this?

https://www.youtube.com/watch?v=jtnC9bEMvHE

You might need to do it somewhere around cg_offsetfirstpersonview

You need to create a position vec3_t for the weapon, and modify it based on the angular velocity of your player, which means you would need to store the last ps_viewangles in your cg_t, I think. Whatever the case, you need angles info from the previous frame to determine how much to offset the view weapon.

And this is all only if you're trying to do this as an aesthetic, and not something that actually influences the muzzle origin, which is a lot more complicated.

Do you have any code written so far?

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/