Someone knows how to make camera stabilizer like in this video https://www.youtube.com/watch?v=lIbGuU5xOLk?
i am trying to do a full body fps but when parent the camera to the head it shakes so much
Someone knows how to make camera stabilizer like in this video https://www.youtube.com/watch?v=lIbGuU5xOLk?
i am trying to do a full body fps but when parent the camera to the head it shakes so much
You have a few options.
Camera parented to the head This of course uses the actual animation shaking. So it means the raw animation shaking and you can only reduce it by adding scripts like that. This is where you at right now, IMO the "hardest" option. The most accurate one. Camera is 100% synced with movement, but do you actually want/need that ALL the time on your game? Think about it.
My recommendation:
Camera parented to player gameobject (root or similar unanimated GO) Same as the past option, but instead, you parent it to an unanimated gameobject.
Eg.: instead of the head, you parent it to the root
This will make it on the player as well, but instead, it wont be bobbing since its object it's not animated. That way, you can add movement/head bobbing (if you feel like it) using easier scripts. This gives you about the same result, but in an easier way. If you wanna try that, maybe that a look at this quick tutorial: https://www.youtube.com/watch?v=5MbR2qJK8Tc
The asset being sold here probably has some pretty sophisticated tech if this camera has been parented to an animated skeleton. In most cases, you would not do this, you would parent the camera separately so it can be animated separately. Typically, if you want the camera to follow the animation, you will use something like Vector3.RotateTowards to rotate the camera towards the direction of the animation at a fixed rotation speed to keep it smooth.
What you are seeing here is likely a version of this approach, with a lot of heuristics to add more natural feeling to the movement.