I’ve been having some trouble with this script I wrote for the 3d platformer blueprint:
While I can get the side movement working, the jump movement is unresponsive. Nothing happens when I press the jump key. What am I doing wrong?
Thank you so much!
You need to call the function Jump in Pawn->Character Category before and just need to set the velocity = get velocity + FVector(0,0,JumpHeight)
You need to add check variable something like IsJumping to know if he is jumping, then disable it if he landing, it have 1 event call Event On Landed. If you want to do double jump or something, just add one more check to know how many time he can press the jump before landing.
Thanks for the reply. I tried you suggestion but it seems that using the Jump function applies the one time velocity, so it won’t update as I hold down the button but next time I jump the jumpheight gets bigger. Do you think there is a solution using addForce instead of jump?
Thanks so much.
When I was adding crouch support, I discovered the the crouch function was disabled by default. Under the defaults for my character class, I had to enable crouch. After I did that it worked. I suspect its possible to disable jump in the same way.
How do you think I would go about writing it without using the jump function? I want more control over the movement than the jump function will allow, how would I do this with add force instead?