How can I limit Aiming to screen space?
Hi, I've been trying to setup a control system for a new project. I have the movement system working as intended, with the UE4 logo as a billboard attached by a spring arm (so it reacts to objects in front of the player) as a placeholder for the reticle.
Now I want to set up the aiming to allow the player to move the reticle anywhere on screen, and to rotate the ship to face it.
I have tried a couple of methods but neither really give the desired effect.
So far I have managed to limit the players aiming, now I simply check if the input added to the players current rotation is larger than the rotation range I've set and clamp it. blueprint (horizontal aiming works the same but uses rotation yaw)
NOTE: This will limit the players aiming to a rectangular region, which in my case (designing twin stick controls) feels a bit clunky.
It depends on how you are moving the aim. I believe there is a function on player controller called Convert Mouse Location to World Space, that might be helpful since it gaves you origin and direction.
answered Oct 04 '17 at 07:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here