What’s happening here is that I have to hold down D to get some movement going. What I want to happen is that it moves immediately when I press D. I already tried multiplying Action Value X with some large number but it’s still the same.
I also want to be able to move “up and down” (i.e., along the Z axis) when I press W and S, but I’m not getting any movement, even though printing the input looks to be what I expected. If I set the second Add Movement Input to World Direction = (0, 2, 0), it does move along Y (zoom away from the “background”).
Print to screen is delayed, and it prints out in wrong order sometimes makes illusion of delayed output.
Create umg widget that displays output and reactions. Even beeter add some interface beep sound when you trigger input. So you know if its delayed or not.
Then get all WASD input calculate vector of movement, then that this result to add movement node.
calculate it like this:
[xaxis,0,0] + [0,yaxis,0] >> normalize * speed
and feed to add movement. This way diagonal move will have same speed as horizontal move.
ps.
I am not sure if is triggered event correct one for this. If this is single pawn that needs input it could be better to process it on tick and just recalculate input, make normalized vector and add it to move node.
But remember to not abuse event tick. Single actor that is pawn is fine though.
I usually found it easier, to combine the Enhanced Input X and Y value into a Vector with the Make Vector node (Z axis stays disconnected - gets zero), and feed that into on e singlee “Add Movement Input” World Direction, and let the Scale Value untouched with 1.
Afaik, that Scale Value works only in the 0-1 range, since the “Add Input Movement” is using the Character Movement Component and so the scale goes always from Zero to whatever Max Speed your current movement mode has. So to get more speed, you have to raise the max speed in the Character Movement component for this movement mode.
And of course, for less sluggish movements, play with the accelleration and decelleration values in the Character Movement Component.
For 2D you might want switch the Y and Z axis in your IMC, if you are playing it in a vertical plane and not on a horizontal plane, thats lying flat on the ground. Or just use the “Make Vector” Node to connect the Enhanced Inputs Y output to the Z axis instead of switching it in the iMC. Whatever is more consistent with Controllers and Keyboard behaviour ^.^
I guess, a First/Third Person Character is viewed from a different angle or side, than a Side Scroller or Top Down Character, so some axis might not move in the correct direction for all modes.
thanks! I didn’t see the character movement component; the “sluggishness” i fixed there
also, idk what version you’re using, but in 5.3, the action value x and y is combined into one struct pin, so there’s no need for make vector. (it confused me for a bit, so i hope this would be useful for someone else).
and i also just rotated the entire thing to make the IMC work, so the plane is normal to the Z axis
My bad, sorry for this confusion ^.^ i tend to split those structs to get the individual axis, since the chars i used so far required the Y-axis in both the normal and the inverted state, wile the X-axis always has to stay normal/unaltered.
You can right click on those pins to split them, which then gives you access to the individual axis values (or whatever is combined in that pin).