Cheo
Active member
Hello, I've been working on a script triggering an event when a character has been falling over a certain distance, but unless I'm mistaken this value is not directly accessible. What is suggest is making a float named something like currentFallHeight that is calculated each frame just like the height var is when OnCharacterLand is called :
You can maybe add a bool to make this calculation optional, but I think this is a justified addition, it is not rare for example to have characters screaming and playing a different fall animation when they've been falling over a large height.
C#:
m_MaxHeight - MathUtility.InverseTransformDirection(m_Position - m_MaxHeightPosition, m_Rotation).y;
You can maybe add a bool to make this calculation optional, but I think this is a justified addition, it is not rare for example to have characters screaming and playing a different fall animation when they've been falling over a large height.