Hello guys,
Im using this Code to make Simple Weapon Bobbing.
void Update()
{
if (something)
{
return; // pause the calccalculation & pause the position
}
float theta = (Time.timeSinceLevelLoad / period) * 0.1f;
float distance = amplitude * Mathf.Sin(theta);
transform.localPosition = startPos + Vector3.up * distance;
}