|
So as you see in most all modern FPS Games, you see sort of a Swaying effect. As in you move dramatically or just a little bit you see the gun follows the cursor/aim area but takes a little more time to get there. So I have been able find some solutions but all lead to animations, how would I go about doing this? The only solution I can find is Animations with warping. Any suggestions? -Devon
(comments are locked)
|
|
This is usually obtained by animations, however if you are like me and not having the skills or people to create such animations, this guy shows you a reasonable way of creating a decent sway effect using code only.
(comments are locked)
|
|
You could have the gun follow the position of the character with transform.position = character.transform.position and then "lag" the rotation by using something like RotateTowards * Time.DeltaTime so that it always takes 1 second to get to the wanted rotation.
(comments are locked)
|
|
Well im not too sure, but yes the only way is animations...try making the gun a seperate peice and make a mounting spot for it. Then i think you will just have to animate the character with bobbing arms held out in position to hold the gun. When it comes to looking around and the gun slightly tipping and following it is mostly done with movement scripts.....
(comments are locked)
|

So what you mean is that you want the gun to lag behind a little bit? If you move the cursor to the right the gun will travel towards the cursor position but not instantaneously?
Have you looked into a lerp? I am not sure if that would work, but I've used that to lag minions behind characters before.
Perhaps done with an animation?