How do I get the speed at which the character is currently rotating?
I need to get the speed at which the character is currently rotating.
With that I mean the player moving the mouse left, right, up or down, how fast it is changing.
There is no
asked Dec 12 '16 at 02:37 PM in Blueprint Scripting
you can easily calculate this by yourself (I'm not aware of any BP node doing this).
Speed = distance/time. Setup a BP that subtracts current position from the last stored position (=distance), get the delta time from your last calculation and you have your speed. Don’t forget to store the current position as last position in a variable...
I’m not in front of my computer right now, but on tick should do the trick.
For the char it's almost the same. Just get the delta rotator (A current world rotation, B last rotation), break the rotator (if you need e.g. the yaw) get the delta seconds divide that stuff and you are good to go.
Hope this helps.
answered Dec 12 '16 at 04:33 PM
Terry J. N.
Follow this question
Once you sign in you will be able to subscribe for any updates here