When I start game from Visual MoveForward and MoveRight functions receives proper axis values. But when I click mouse button this functions receives only zero values until left or right mouse button pressed.
Still same thing with GetInputMouseDelta() on Beta5 for me.
GetInputMouseDelta() returns zeroes till you press any mouse button. So for me, i can use it only if i hold one of mouse button.
Did this bug was removed in beta 5 or still not?
How to reproduce this bug:
in playercontroller’s ProcessPlayerInput():
Hi . I was wondering if I could a bit more details on your setup and the specifics of the issue you are seeing.
I setup my DefaultInput.ini as you specified and then bound the axis and action events in the level blueprint to print out the values that the events received. My experience was that the mouse delta values coming in through MoveForward and MoveRight appeared as expected regardless of whether the left mouse button was pressed or not once the window had mouse capture.
If you use this same setup do you get the same problematic behavior? There was a bug that could have lead to what you see in Beta3 but should be fixed in Beta4.
Just checked. With this setup behavior is the same. I think the problem in setup. I am using PlayerPawn class inherited from APawn. So maybe there are some variables that needs to be configured.
Can you confirm that you are using Beta 4? When you do Help → About what is the Version #?
Can you give me more details as to why you think you might a problem in the setup? I can’t really think of anything you could do variable wise that might have such a behavior.
It might also be useful for you to try using a new project based on something like the first person template and try this setup there as well.
Actually I’m trying to use mouse axes for camera movement, so I need deltas.
I know that I can store mouse position each frame and calculate deltas, but I think that using axes is much more suitable.
If you just want mouse delta, I highly suggest you use
playercontroller.h
/** Retrieves how far the mouse moved this frame. */
UFUNCTION(BlueprintCallable, Category="Input")
void GetInputMouseDelta(float& DeltaX, float& DeltaY) const;
You can run this every tick in a custom player controller class or on a timer via blueprints (it is blueprint callable)
Enjoy!
PS: also you should consider responding with comments, not by the bottom-most portion which means you are giving an answer to the problem
Thanks for your answer. In fact I already tried to use this functions and it behaves the same. It returns non zero deltas only when one of the mouse buttons is pressed. Maybe there is some magic boolean switch. I don’t know. )
Since i got the same problem here, no matter if i get the axes from InputBindings or from GetInputMouseDelta, i always only get values != 0 when i do a mousepress too, is there any solution to this?