so when you play minecraft it has this really smooth item/weapon bob effect that looks really smooth and feels good to use. its similar to the one on the classic doom games but ive been searching everywhere but i cant find a single result on how to do this. i heard its related to the parabolic eqaution but im a beginner and i dont know sheet
Easiest solution would be making animation curve for both axis for x other for y and apply to transform.localPosition in Update() method.
[Range(0f, 1f)]
public float animationTime;
public AnimationCurve myAnimationY;
public AnimationCurve myAnimationX;// in update
transform.localPosition = new Vector3(myAnimationX.Evaluate(animationTime), myAnimationY.Evaluate(animationTime), 0f);
You configure each axis x,y animation bob separately in inspector, last thing what you need to do is just update you animationTime float from 0 to 1 in update which represents your single movement cycle.