Hi, I have searched the forum and found these twoposts but I am still having trouble.
I am using the first person character template. I am trying to set the character speed dynamically to a value when the user presses a key.
I was able to get the Movement Component from the actor, but for some reason it gets returned as a Pawn Movement Component, which seems to not have a Set node for speed, only a Get node. The Character Movement Component does have a Set node, but my Pawn Movement Component cannot be cast to a Character Movement Component.
My goal is to increase or decrease player speed dynamically, when certain keys are pressed, using blueprint, on the default BP_FirstPersonCharacter blueprint.
I can achieve this effect “statically” by changing this variable in the editor, but I want to set it dynamically using blueprints.
Ah, just as I was grabbing the screenshot to paste here, I saw what I was doing wrong (was having a branch node sending the exec flow to the wrong place). My bad, the cast from Pawn Movement Component to Character Movement Component is actually working. THANK YOU!
Edit: for reference, here’s how I ended up doing it: