Forum rules - please read before posting.

Camera speed problem between build and editor

Hello,

I have a problem with the TPS Camera. I've set it up as shown on this screenshot (nothing special, just set the position and the speed to my liking) and it works as expected in play mode. In this setup the camera is rotated with the right joystick of an Xbox controller, not a fast rotation, quite normal let say.
But what is quite weird is that when I run a build of my game, then the camera speed is super fast. Like it doesn't save the settings from the editor which doesn't make much sense but I don't see what could cause such problem

ps: I tried to check the "scale speed with input magnitude": no effect

If you have any idea?

Comments

  • Welcome to the community, @Necka.

    What are your AC and Unity versions?

    Though it shouldn't be, could it be that the speed difference is related to the difference in resolution between builds and Editor testing? Try running the Build in a different resolution - does that make a difference?

    I'm not sure why you'd be getting such a speed difference, though it may be worth considering use of the Advanced Third-person camera, which is a bit more robust.

  • Hi Chris,
    Using the latest update from AC (the one which dropped recently on the asset store) and also latest Unity (2019.4.1)

    I didn't know the advanced TPS Camera, I will have a look at it

    Yes the resolution is different. Since Unity doesn't provide a launcher anymore I was too lazy to build a configuration tool to change resolution (I debug at 4k 16:9 and I have the build at 3440x1440 21:9)
    But the resolution difference never created an issue with Cinemachine so it's weird

    I will anyway try now with the advanced module and see if that helps

  • Update: So I find the Advanced TPS camera really really good
    Sadly the problem remains...

  • edited June 2020

    Sadly the problem remains...

    As in, it's also with the Advanced TPS camera?

    I'll still need to know if resolution is a factor - can you try a new build with a resolution similar to that used by the Game window in the Editor? Likely, it isn't resolution related, but it's not an issue I can recreate so we'll need to try such things to try to find the cause.

    I'm assuming your "Mouse X" and "Mouse Y" inputs are set to their default values in Unity's Input Manager.

    As an aside, a tutorial on creating a screen-resolution option in-game can be found here.

  • Hi Chris,
    first thanks for your support
    so yes, problem remains the same with regular TPS Cam and Advanced

    I just created a simple script to test this:

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.J))
        {
            Screen.SetResolution(1920, 1080, true, 120);
        }
        if (Input.GetKeyDown(KeyCode.K))
        {
            Screen.SetResolution(3440, 1440, true, 120);
        }
    }
    

    The resolution doesn't affect the speed problem.

    I made a simple short video showcasing that issue.
    For the explanation:
    We start in editor, I first push slowly the right stick to turn the camera then push it harder in the same direction to raise the camera rotation speed (set to 2 in that case)
    Then I switch to my Build run and do the same

    The Camera is out of the box, I just changed the max speed from 3 to 2

    The Input settings:

  • I tried once again with Cinemachine freelook Camera and I do not have the same issue with it. So it's really weird

    I found this post where the author found the solution to his problem himself, I don't know if that could be something similar that's happening in the Camera rotation code?

    https://forum.unity.com/threads/solved-different-camera-speed-in-editor-and-build.535801/

  • Tested with a new project (still 2019.4.1) with only Adventure Creator in it, new scene just Tin Pot and the Camera, same issue :(
    I'm out of ideas for testing
    Of course if I drop down the Axis sensitivity in the input manager it drops it proportionally in both Editor and Build (I.E: In Editor it becomes extremely slow and in Build it's normal) so that's not the solution either
    Build is standalone PC btw, nothing special here

  • Have you been using a controller the whole time? It may be a hardware issue, as I'm still not having any luck recreating the problem using the same values as your screenshots.

    If you disconnect the controller and switch your CursorHorizontal / CursorVertical axes to instead rely on the keyboard keys, do you get the same behaviour?

  • Yes, mostly with a controller but I noticed the issue before even with the mouse.
    Here is a test where I changed the input to left/right arrow as positive and negative buttons. Result is the same the speed is different

    Just for the sake of testing even though I dislike the asset, I installed Opsive TPC as I know they also have a custom Camera controller. I do not have the issue there either between editor and build the camera rotation speed is the same.
    I really have no clue on what's going on with the AC Camera controller, and I really love the Advanced TPS controller it's really doing what I want.. so I hope we can figure something out

  • edited June 2020

    I sent you an email with an extra small project that has the issue on my side

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.