Forum rules - please read before posting.

Problem switching cameras

Hello again everyone, Ive been baging my head around trying to figure this out, for some reason I can't switch cameras, it worked for a bref period of time but it doesn't work now, Im using the First person camera, and when switching the camera just does a fade to the same position and my movement gets locked directionally, I can still move but it dosent follow the camera anymore.

I've seen various threats and videos saying to change the movement method to none, but it doesn't change the camera and completely deactivated my movement method, even in the AC game editor.

I remember working fine before I allow player switching, but I turned it back off and still doesn't work, so probably has nothing to do with it.

My target camera is a Game Camera with the Constrained First Person Camera script found in the wiki, although Ive tried new cameras and non of them work either. It might be something really simple but I'm not seeing it.

Anyways thanks in advance.

Comments

  • Sounds like you're on the right track, but there's a couple of things to note about this technique:

    1. When in First Person mode, AC will automatically switch to the first-person camera while in gameplay. You can switch cameras during cutscenes, but if you want a different camera during gameplay, then you'll have to switch Movement method to None before switching camera.
    2. The "Movement method" is a global setting, as it's part of the Settings Manager. As you've seen, this means that changing it will affect things in the Editor as well. To get around this, you can use a separate Engine: Manage systems Action to force the Movement method back to First Person when your game begins. You can do this by placing this Action in an ActionList asset file, and then assigning that file as the Settings Manager's ActionList when start game field near the top.

    The AC Status box may be able to shed some light here. You can enable it at the bottom of the Settings Manager, and will display in the Game window at runtime.

    If you've followed the above and things still aren't behaving right, share screenshots of your exact set up and I'll try to spot what's wrong.

  • So, I think I manage to figure it our.
    The camera object of my First Person Player had the component Camera ticket on, which I guess it was interfering with the Main camera on the scene. Seems to work now. but I'm not sure what's the best practice here. I see that I can assign a default camera on the scene settings.

    And thanks for the help, the AC box did helped me figure it out.

  • AC's Camera system works similar to Cinemachine, if you're familiar with it. The MainCamera is the one that renders at runtime - with other cameras (GameCameras, FirstPersonCamera etc) merely acting as references for it's position.

    The Manual's "Cameras overview" chapter outlines this in more detail.

    These other cameras can have Camera components - as AC will automatically de-activate them at runtime. Was your First Person Camera's Camera component ticked on during Play mode?

    If you're using AC's First Person Camera component, this should be unticked automatically. Otherwise, you can attach AC's "Basic Camera" component to it to make it visible to AC's Camera Actions and fields. See the Manual's "Adding custom cameras" chapter for more on this topic.

  • It doesn't seems like it deactivates it. But i'm not really an expert so I cant really tell. But for now I just leave it deactivated just in case.

    If you want to troubleshoot it just in case its a bug on adventure creator I wouldn't mind checking whats up.

  • It doesn't seems like it deactivates it.

    To be clear: you're referring to the Camera associated with AC's "First-person Camera" component?

    I can't recreate such an issue - is the latter component present in your Player's Hierarchy, and are there any non-AC components present that may affect it?

  • Yeah, I was talking about the Camera, the one at FirstPersonPlayer> FirspersonCamera> Camera. But I did have one object at the same level of the Camera, it was just an empty prefab I created for NPCs to look at the camera even while crouching.
    I deleted and ticked the camera on again to check if that was the problem but didnt solve the issie, the other only thing I have its the scrip to check if the player is crouching that you kindly provided.

  • I would need to see the project for myself to get to the bottom of this. If you're able to PM me a .zip of your project with instructions, I will take a look.

  • Aright, give a sec its 11gb and I don't have the fastest of internet connections.

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.