Trying to rotate an object as long as a key is held
I'm trying to rotate the object that a top down camera is attached to so that when one key is held down it rotates one way and when a different key is held it rotates the other way. I've managed to get the rotation to occur when the either of the keys are pressed but the rotation only occurs once instead of continuously and when the key is released the rotation is reset
Edit: updated the blueprint picture
The GetActorRotation returns the rotation of the root component of the actor, however the SetActorRotation sets the rotation of the actor, not the root component. So I guess you are never changing the rotation of the root component, and adding to it every frame, so the new rotation value essentially stays the same. Try to set and get the rotation of the root component directly instead of the actor. (If this is the problem, then these nodes are have a serious naming problem)
answered Mar 25 '17 at 10:04 PM
This one is actually rather simple.
For starters, you need to have your camera and object you are rotating part of a Pawn blueprint like so:
Than in the project settings create a new input for "Turn"
Finally add world rotation using the new "Turn" event that gets created when you make the inputs in the project settings:
If you haven't already, make a game mode with the Default Pawn Class set to your new pawn, and in the world settings change the GameMode Override to your new game mode.
answered Apr 26 '17 at 08:37 AM
that sequence node will never be executed like that because it does not have an entry from tick.
plug tick in sequence. then connect
answered Mar 23 '17 at 12:34 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here