Detecting Mouse Movement?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.
From the way you wrote it you are accessing it from another class. Iirc that never works because you are handling input flags and they are reset after usage (not 100% on this one tho)

Handling your check directly in function UpdateRotation(float DeltaTime, float maxPitch) will work however. And check for "if (aTurn != 0)" ;)
 
No .. it is contained in the Controllerclass. You could however overwrite the controllerclass and have UpdateRotation store the value in the corresponding pawn for example. WeaponFire could then access it ... however the next time updaterotation is called this movement value is gone again unless you add code to counter this (maybe with a timecheck to see if the pawn turned within the last second?)

The problem you are running into is updaterotation being called frequently. When it is called and you are not turning in the instant your are checking but instead the tick before your rotation check will give you a "no rotation in progress".
 
Last edited: