Forum rules - please read before posting.

What is the "Advanced third-person camera"?

Hello ACeople. I've been exploring the documentation and noticed a link on the download page for an "advanced third person camera." How is this camera different from the standard AC third person camera? The description says it is "a little beefier" but there is no actual documentation on how it's actually different or what it can do. Any info appreciated!

«1

Comments

  • edited August 2019

    Aside from some "under the hood" improvements such as smoother motion and better collision detection, it also offers:

    • The ability to vary both the height offset, and distance from the target, with pitch angle (so that e.g. low angles bring the camera closer to the character's head)
    • The ability to pull back when the character it's following moves quickly (so that e.g. more of the environment is shown when running)
    • The ability to auto-correct it's spin angle when the character moves sideways (so that e.g. the character's destination is revealed even if the player doesn't move the camera at all when running in circles)
  • Ah neat. I will have to try it out. I'm so used to the standard 3rd person camera that anything new is strange and scary! :)

  • edited August 2019

    Played around with this. I like it! Although it lacks (or I can't find) some features that the default AC third person camera has.

    1 - the ability to zoom in and out using the mousewheel
    2 - the ability to adjust the horizontal offset (I don't want my character smack dab in the middle. I want her a little off to the side so she doesn't block what's in front of her).

    Do these things exist in the advanced camera? If not, was there a reason why there were omitted or was it just an oversight? (e.g., i imagine the ability to zoom would play havoc with the top/middle/bottom settings)

  • If not, was there a reason why there were omitted or was it just an oversight?

    Neither - it's not an "official" camera, which is why it's offered as a separate download.

    It's based off a script I was writing for a personal project, which I adapted to work with AC. I'll bump this thread if I manage to update it with the above, however.

  • Gotcha. In that case the vanilla camera works fine for now. Thanks. :)
  • OK. Updated the camera with zoom options.

    As for offsetting, the camera itself is on a child object, so it should just be a case of adjusting it's position or rotation to suit. However, there is currently an issue whereby the MainCamera will snap to the Transform of the script, not the Camera itself (usually these are assumed to be the same). I will address this in the next release, so it should work from then on.

  • Oh, thank you! I'll check it out. Thanks. :)

  • edited August 2019

    Well, I checked it out! Sadly, the zoom feature doesn't seem to do anything when I activate it. I set it to zoom on the "axis" and use "Mouse ScrollWheel" as my input axis (which is setup properly in the project settings), but nothing happens when I move the scroolwheel. Also, the "pull back when running" thing doesn't seem to be working at all anymore, unless I am getting the settings wrong.

    Screenshot of my settings here: https://imgur.com/a/HJX8rNg

    Any help appreciated! :)

    edit: And while I'm asking for stuff, another great feature of the original 3rd person cam is the actionlist command to rotate the camera relative to the target. I like being able to transition back to my main 3rd person camera and have it be behind my character regardless of which direction she's standing in.

    And that's enough demands from me. Thanks again, btw.

  • nothing happens when I move the scroolwheel

    Apologies. Download and try again - should be fixed now.

    Also, the "pull back when running" thing doesn't seem to be working at all anymore, unless I am getting the settings wrong.

    I'll need to see the whole Inspector - I can't recreate the issue. Are things any different if you set your player to Tin Pot? He can be found in /Assets/AdventureCreator/Demo/Resources.

    another great feature of the original 3rd person cam is the actionlist command to rotate the camera relative to the target

    I shall look into this.

  • edited August 2019

    Thanks Chris! I downloaded the new package and imported it, but it still does not seem to zoom. On a whim I tried importing the package again and I noticed that the "AdvancedThirdPersonCamera.prefab" file was shown as out of date, so I reimported it again. Still no zooming. I tried reimporting again and it still said the file was out of date. Is there a reason why it's doing that? Not sure if I'm doing something wrong with the importing. Regarding the "zoom out while running" thing, here's the entire inspector: https://imgur.com/a/0L4pOne

    (BTW thank you for indulging me all my silly questions and requests. I feel like a total greenhorn on this forum!)

  • If this is a Console message, can you post it?

    It's a simple fix: just open AdvancedThirdPersonCamera.cs, and replace its UpdateZoom function with the following:

    private void UpdateZoom ()
    {
        switch (zoomMethod)
        {
            case ZoomMethod.None:
                return;
    
            case ZoomMethod.Axis:
                if (KickStarter.stateHandler.gameState == GameState.Normal ||
                    (KickStarter.stateHandler.gameState == GameState.Cutscene && allowCutsceneControl))
                {
                    float deltaZoom = -Input.GetAxis (zoomAxis) * zoomSpeed;
                    float targetZoom = Mathf.Clamp (Camera.fieldOfView + deltaZoom, minFOV, maxFOV);
    
                    Camera.fieldOfView = zoomLerp.Update (Camera.fieldOfView, targetZoom, 5f);
                }
                break;
    
            case ZoomMethod.Button:
                if (Input.GetButton (zoomAxis) &&
                    (KickStarter.stateHandler.gameState == GameState.Normal ||
                    (KickStarter.stateHandler.gameState == GameState.Cutscene && allowCutsceneControl)))
                {
                    Camera.fieldOfView = zoomLerp.Update (Camera.fieldOfView, minFOV, zoomSpeed);
                }
                else
                {
                    Camera.fieldOfView = zoomLerp.Update (Camera.fieldOfView, maxFOV, zoomSpeed);
                }
                break;
        }
    }
    
  • Not a console message. Just when I re-import the package, it says that the prefab is out of date even if I've already updated it.

    I updated your script and that still didn't work. :(

    Here is my inspector again: https://imgur.com/a/0L4pOne

  • edited August 2019

    Oh wait. It does work, it just moves so incredibly slowly I didn't notice. I pumped the slider up to 10 and it better but still moves very slow. Is there a way to increase the sensitivity?

    edit: by "slowly" I mean that it only moves a tiiiny bit with each spin of the mouse wheel. Changing the speed fixes the problem a bit but only marginally. I went into the code to try and increase the maximum to 20 and even 30, but the same problem remained.

    Here's a comparison with the original cam to show what I mean:

    Original cam zoom:

    Advanced cam zoom (with speed set to 10):

    And gosh I feel super guilty for bugging you with this stuff. Thanks again!

  • edited August 2019

    Ah, I think I was being stupid here. We were talking about zooming, so the script affects the camera's FOV - not the distance from the target (which is what the "base" third-person camera does).

    I'll correct this today. The package's Action has also been updated with a "Move To Rotation" option with a "relative to target" option.

    (EDIT: Done)

    You may have to delete the folder from your project before re-importing. I was asking to see the Console message in full because I don't know where this is coming from.

  • Like I said, there is no console message at all. I will try to reimport without deleting because I've used the new camera in several actionlists and I will lost the reference if I delete. If things go wobbly then I will delete and try again. Thanks!

  • edited August 2019

    Sorry, I misread. But a screenshot of the exact message as it pops up is what I'm looking for.

  • Sorry for the delay in responding! I was away at PAX. Will check this out now. Thanks!

  • No worries. And the update to allow independent movement of the camera child is now out.

  • There seems to be a bug with this camera in which it will not allow the player character model to disable the skinned mesh renderer that contains blend shapes. I deleted the camera from the scene, and the renderers were able to be disabled again like normal.

  • Disabled in what way? Through script? The camera shouldn't affect the player at all.

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.