#Help with Character movement please?

17 messages · Page 1 of 1 (latest)

oak sigil
#

Hi friends, could use some help.
I've gone through the movement portion of the course multiple times but I'm still unable to get my character to move. Unless I'm missing something and/or something is wrong with my code, I'm not sure how to fix this. My character just rotates every time I press WASD keys. I'm attaching my code and short video for reference. Thank you!

grave spade
#

Have you figured it out?
your code looks okey, but I wonder if it's actually being called
have you tried debugging it like putting breakpoints?
if not and you don't know how to do it
can you try to put write a debug message
UE_LOG(Logtemp, Warning, TEXT("This function is being called"))

#

and check if you have it in your console log

#

what we can't see from the things you provided is:
have you assignmed InputActionMapping and Input Actions in your blueprint?
you could provide the .h file of the controller

#

another thing could be is that you haven't assigned keys for them, one more thing that we cannot see here

oak sigil
oak sigil
#

This has truly stumped me, I've worked on tryng different things for hours and it still doesnt seem to work

grave spade
#

Very interesting, you are triggering your things.
Can i see your cpp file? Also could you check when you start the game what actors are spawned? I wonder if your controller actually controls the pawn we see. You can see which actors are spawned in the outliner they will be yellow

#

Depending on how you bind move action it might need to be UFUNCTION

#

Actually i can see in your breakpoints that controlledpawn in serathcharacter

oak sigil
#

Here's the Spawned actors when I hit play. I also changed the if check to check if the pawn is my Player character, and it is. I still hit my breakpoints. I wonder if theres something in my ABP that may be messed up now. I also made my AutoRun and Move functions UFUNCTION, and I still get the same results.\

oak sigil
grave spade
#

Alright, your setup seems to be all good, i can only think now that you’re blocking input or movement somewhere.