Hi, I have implemented a Sit ability. Everything works fine, except when I use characters of different heights. For a small character, their bottom is below the seat by default.
I thought I could get around this by calcuating the offset from the ground to the hips for an average character that sits on the chair perfectly, and then calculating the offset from the hips for a small character. For example, an average character may have their hips position at 0.9, and a small character may have their hips position at 0.5, so the hips offset for the small character is 0.4. When the small character sits in the chair, I want to add 0.4 to the character's y position.
I tried setting the game object transform directly in the ability, but that seems to be ignored. I tried using m_CharacterLocomotion.SetPosition(), but that stops the ability working.
Is there a way I can introduce this y position offset when the ability is active?
I thought I could get around this by calcuating the offset from the ground to the hips for an average character that sits on the chair perfectly, and then calculating the offset from the hips for a small character. For example, an average character may have their hips position at 0.9, and a small character may have their hips position at 0.5, so the hips offset for the small character is 0.4. When the small character sits in the chair, I want to add 0.4 to the character's y position.
I tried setting the game object transform directly in the ability, but that seems to be ignored. I tried using m_CharacterLocomotion.SetPosition(), but that stops the ability working.
Is there a way I can introduce this y position offset when the ability is active?