in cpp line 38 and 52
when I click space in the game the player doesn’t jump
You’re binding to the wrong thing for Jump.
PlayerInputComponent->BindAction( TEXT( "Jump" ), IE_Pressed, this, &ACharacter::Jump );
I know I can do it in this way but I wanted to use the GetActorUpVector … because it seems similar to the other functions like GetActorForwardVector
so I want to be creative and use the GetActorUpVector but it doesn’t work I don’t know why
I see. But the up vector is about 1cm in size, and adding it once won’t move very much. You then need to take into account how high a jump is and how fast they jump and is there any horizontal movement too and if the player presses jump again while in the air (so double jump action)
Try multiplying up by 100.0f as a test and I suspect it’s actually working. What I would imagine will happen is the player teleports up by 1m and then fall to the ground.
it didn’t work …
But it’s okay I will use the way you had say it before
That is strange. I would have thought it would work.