Up/down instead of forward/backward for fly ability?

ChristianWiele

Active member
Hi,

I am trying to implement a fly ability, but I would like the character to move up/down instead of forward/backward with the vertical axis. What is the recommended way for redirecting the input accordingly?

Thanks, Christian
 
Depends on how you're implementing this fly ability, but in general you'd want to use the "Vertical" input axis to determine the character's movement along the Z axis.
 
Yes, sure. I have created a bird with only one ability (fly), which is empty right now. I set the state to "airborne" / not stick to the ground. With the movement types I can only define the horizontal movement, not the vertical one. By default the vertical input is translated into horizontal (forward/backward) movement. So, how do I avoid the horizontal movement? I know I can use the UpdatePosition method in the ability to add vertical movement, but as I understand it is only additional, not replacing the core movement.
 
The Swim ability from the Swimming Pack is a great example of how you'd approach fly. You'll want to disable gravity and then use the look direction from the look source to determine the direction that the character should move. This makes it work with any movement type, no matter if you have the horizontal direction or not.
 
Thanks. I already looked at the swim ability but wasn't sure that I wanted to use the look source for navigation. I will check back with my user base for feedback, and give the swim approach a try.
 
Top