I’m pretty new to working with blueprints and programming in general, so I’m learning a lot by following tutorials and making mistakes along the way. Please bear with me if I say something that doesn’t make much sense, haha.
Right now, I’m trying to set up a simple camera system where I can rotate the camera around the player in 90-degree steps. The idea is that every time I press a key (say, Q for left and E for right), the camera smoothly rotates exactly 90 degrees and then stops.
I’ve managed to get the camera to move constantly in one direction when I press a key, but I haven’t figured out how to limit it to 90-degree steps. It’s probably something simple I’m missing! I’ll paste my current blueprint setup below to give more context.
Any advice, pointers, or suggestions would be super appreciated. Thanks in advance for the help!
For this you should be able to simply multiply by 90 (as the action value will always be 1 or 0) instead of by 1.0 like you have.
You will probably need to open that input action and make sure it won’t constantly fire, you will need it to be one-press-one-use. You can try using the “Started” execution there and see if that will work!
Thanks so much for the warm welcome and your reply—it’s super helpful!
I think I understand the idea of multiplying the value by 90, but I’m having trouble making the input fire only once per press. Could you clarify exactly where I should set it to ensure it’s one-press-one-use? Is it something in the Input Action Asset itself (like a specific trigger setting) or is it more about how I handle the input event in the blueprint?
If you tried just hooking up the “Started” instead of “Triggered” you should open the Action itself and look at the trigger. There will be options like “Press”, “Press and hold” etc.
Try to look at those a bit and see if any seem like the better idea!
Also look at your Input CONTEXT to make sure the context isn’t overwriting your input values for that input!