The title may be vague but please bare with me,
My Game is in First Person format and my issue relates to the rotation of the visible hands.
When you move the Player I would i like it if the Hands in front of the camera were slightly delayed, somewhat smoothed following the camera (they are currently a child of the FirstPersonController asset kindly giving to us in standard assets. I have searched for a while on this issue but I fear i am not using the correct combination of words.
Thanks for reading, I hope I’ve explained well. I’ve included a picture to hopefully further visualise.
One approach you can use is to make the hand models NOT children of the camera, but leave an empty “target” gameobject as the child of the camera, and then lerp the position of the hand model to the target position. Suppose this is in the Update method of a script attached to the hands model:
this.transform.position = Vector3.Lerp(transform.position, targetTransform.position, lerpSpeed * Time.deltaTime);
You can adjust the lerpSpeed value to whatever you want, 5 should be a reasonable starting point.
Wallace, thank you very much. I’ve been over to Stackoverflow as well and they had a similar response.
Edit: Just wanted to add i wasn’t keen on moving the arms from the parent child relationship to begin with, but its clear this is the only way to create the effect im after.