Quake3World.com Forums
     Programming Discussion
        Weapon model sway in camera movement


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Weapon model sway in camera movement

Grunt
Grunt
Joined: 20 Feb 2011
Posts: 57
PostPosted: 01-05-2015 03:19 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

Grunt
Grunt
Joined: 20 Feb 2011
Posts: 57
PostPosted: 01-09-2015 04:27 AM           Profile Send private message  E-mail  Edit post Reply with quote


Any ideas? :D




Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 563
PostPosted: 12-29-2016 09:25 PM           Profile Send private message  E-mail  Edit post Reply with quote


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?




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.