I have head (camera)
and holster (white block) (child of camera object)
I need to keep holster (white block) always under the head with small shift left side.
holster script:
```
void LateUpdate() {
Vector3 parentPosition = transform.parent.transform.position;
parentPosition.z += -0.5f;
parentPosition.x += -1.00f;
Quaternion currentRotation = transform.rotation;
transform.rotation = Quaternion.Euler(0, currentRotation.eulerAngles.y, 0);
transform.position = new Vector3(transform.position.x, 0.7f, transform.position.z);
}
it's working fine. keeps vertival rotation of my head
BUT if camera looks down - holster(white block) move back.. (how to avoid this)??
see video https://skrinshoter.ru/vSn7xPLPP0l?a
thank you in advance