Hold shift to run script

I’m making a horror type game, but I need a script to make it so i can hold shift and the camera will move faster than normal. I have tried myself but I have no idea how to do this. Could someone help me with this? Thanks!

Hi @TheLaidBackLama,

It’s not currently possible to:

  1. Use Shift as a KeyCode
  2. Easily change the speed of the Camera via code

However, you can override the WASD/arrow keys to control the Camera movement and use a different keycode (e.g. “E”) to change the speed - see this demo I created:

Hope that helps! Let me know if you have any further questions about this. If this solves your problem, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap

Actually, I just noticed that Shift and Control are available as KeyModifiers in the public API, but there doesn’t seem to be any obvious way to use them.

@Stefan or @mikhailo, can you provide any guidance here?