Reply To: Rotate as long as key is pressed

NodeCanvas Forums General Discussion Rotate as long as key is pressed Reply To: Rotate as long as key is pressed

#11423
Gavalakis
Keymaster

Hey,

For chocolacode’s suggestion, you simply need to change the Check Keyboard Input from “Down”, to “Pressed”. As such the conditional decorator will evaluate as long as the key is pressed/hold.

For my suggestion, if you simply want rotations and no movement, you can use GetInputAxis, then a “Script Control/Execute Function” task and select “Transform.Rotate(float, float, float)”. Then link the x, y, z parameters of that Rotate Function to the variables saved by the GetInputAxis. For example:

Rotate

Let me know if either of those work for you.
Cheers!

Join us on Discord: https://discord.gg/97q2Rjh

Attachments:
  1. Rotate.png