DS game-style FPS camera control

Hello! What I mean by DS-style camera is this: lRAlhL3nX1

I saw a post by Taialt97 from 2017 asking something similar, but I couldn’t get it to work. I’m simply trying to make some sort of boundary where if the cursor moves closer to it, then the camera rotation speeds up, and to have a small deadzone in the middle where there isn’t any camera rotation.

Thinking about it a little more, it might be similar to the lag settings in the SpringArm, although I’m still lost on this.

Any ideas/examples would be super helpful!

hi @SpiffyCS
using a touchinterface connected with axis mapping will output a value from 0 to 1
For example
-1 (Left) to 0 to +1 (Right) So you can simply check if the value of the output is
between -0.5 and +0.5 this mean you are moving halfway the pad, and so choose if move the cursor or the view based on this.
Here a bit long video that shows how walk and run based on how much you are pulling the stick

It’s an interesting video, although it’s very confusing and doesn’t seem to be planned at all. I’m also completely lost on how the Touch Inputs interact with the character Blueprints to do certain things (like looking around). I tried to follow it but didn’t have much success. I did find that the Axis Value of moving the mouse goes from 0 upwards, then back to 0 as the mouse slows down. Maybe if I could somehow make the mouse be in the middle of the screen at 0, and clamp it to 1 or whatever, so that it moves back to the centre (0) of the screen when it’s not moving. I’m not sure how to make this though, and the Touch Inputs seem like a good idea, but I just can’t for the life of me get them to work.

Hi man,
yes sometimes the videos are alittle weird…
But is very simple,
you can set up Action-Mapping and Axis-mapping
Action-mapping just happen, Jump!
Axis-mapping release an output with a range … from 0 to 1
you just need to check whats the value of the axis, Here he was checking if was different … you probably need to use “if is minor <” or greater >


If you are using a touch interface lillke in the video
be sure to checck also the mouse-to-touch ! here!

For using the mouse without the touch interface is the same thing
you just need to check if the axis value is smaller than a threshold and add an If.

I tried doing >, <, etc. with branches and connected them to Add Controller Yaw Input, and it either worked like a normal FPS camera, or stopped whenever the branch was not true (which of course it would), and so it did not have the desired effect. I was thinking maybe having a point in the player character just in front of the camera where the camera will always point at, and have that move with the mouse, so that then lag can be applied to it to have the camera “catch up” with it when rotating. Then it would just be a case of clamping how fast or far that object can move, although I really don’t know how to implement this kind of thing :sweat_smile:

Try this:

See how it feels.

Main graph:

Function:

This can be done in many ways. This may not be the best depending on how it’s supposed to feel. The gun rotation can be added on top, but that’s the easy part, me thinks.

Good luck!

3 Likes

ooo i think i got it wrong XD
you just want to clamp the gun with the actor rotation,
here a quick test,
i placed the gun under a scene component,
and when the mouse moves, i check if the gun is already on the max left or right,
if it is , i rotate thee actor , otherwise i rotate the gun

2 Likes