Hi all, I want to give my character in the third person template the ability to hover in the air by the press of a button. By hover I mean stay in the same place after the button is clicked and when said button is released you fall to the ground. could somebody start me of in the right direction I have no idea where to start on this.
you could turn off gravity for your character and set the characterMovementComponent’s velocity’s Z value to 0 when the key is held. then on release of the key, you can turn on gravity.
could I have this in a screenshot? so when x key is pressed apply no gravity and when said key is released reapply gravity. I don’t understand what this characterMovementComponent you speak of is?
-edit: what I mean is I cant find characterMovementComponent
if you go to edit > project settings > maps and modes
and look for defaultCharacter it will show the name of the character blueprint your game is using. it will probably be called myCharacter if you haven’t changed it. you can search for that blueprint, open it, dock it to the toolbar. then inside the variables list, click on “show inherited variables” , and under character you can find characterMovement. drag that into the working area of the graph and click “Get”. from the variable reference node that appears, drag out a line and in the search box type “get velocity” and click on the item in the list to get its velocity.
then switch tabs on the top right to the components tab and notice you have the same characterMovement variable in your components list. clicking on that gives you a list of the default values for your character’s movement, like how fast you walk or how much you can control your fall.
GravityScale, just like Velocity, is a property of CharacterMovement, so to see it on the list of options, you should drag a line off of a CharacterMovement variable reference and search for gravity.