I've started to create a 'Jetpack' Ability. I wrote 3 lines of code to add some value to the Y component of the character's position for each frame the user holds down a button. This works for a few frames but then the character starts falling even though logging shows the code is still being run (there are no other active abilities on the character). Here is the code:
1. Why does he start falling instead of moving upwards?
2. What is the different between LocalDesiredMovement and DesiredMovement? I cannot find any comments or documentation.
Cheers
Mat
public override void UpdatePosition()
{
var desiredMovement = m_CharacterLocomotion.LocalDesiredMovement;
desiredMovement.y += m_Thrust * (m_CharacterLocomotion.TimeScale * Time.timeScale);
m_CharacterLocomotion.LocalDesiredMovement = desiredMovement;
}
1. Why does he start falling instead of moving upwards?
2. What is the different between LocalDesiredMovement and DesiredMovement? I cannot find any comments or documentation.
Cheers
Mat