Forum rules - please read before posting.

Deleting default main camera damages GUI and character stops moving.

Hello. I'm
having a problem with AC and I can't figure what the problem is.

I was building a simple test scene (the grim fandango I posted in the showcase
forum) and I wanted to make the camera move and follow the character inside the scene like in
the tutorial video but I noticed the camera in my game didn't have the options
shown in the video, so I deleted it and added a new camera from the game editor, made it's tag as main camera and added it as the main camera in the game
editor, but when I hit play the character is locked in the 0/0/0 position and
it doesn't move when I click all over the scene.


Also the menus and inventory disappeared or are not shown trough that camera
either (added the GUILayer component to the new camera and didn't work).



If I use the "organize room objects" button in the game editor, it
deletes the camera I created and restores the one without the movement and
rotation options (which only has a "look at child" option).

The console doesn't display any errors so I'm kind of lost. Am I missing a step
or do I need to add another component to the new camera?



Any help would be appreciated :)

Comments

  • I think you're misunderstanding how cameras work a little - essentially, the only camera that's ever actually "active" is the MainCamera.  All other cameras (the GameCameras you create using the Scene Manager) are just references for the MainCamera to go by.  Each GameCamera has it's own set of controls, and when that camera is seen to be the active one, it's really just that the MainCamera is sticking itself to it, and copying it's behaviour.

    Best to start again - remove all the cameras from your scene, then click "Organise room objects" so that the proper MainCamera is restored.  Then use the Scene Manager to add GameCameras (with all the rotation options).  You can set any camera as the default one, by assigning it as the "Default camera" at the top of the Scene Manager.  You can also use the Camera: Switch Action anytime in-game to change the active GameCamera.  The only thing you don't want to do is actually touch the MainCamera itself.
  • Ooooooh I
    see!! (I missed that by a mile), I had no idea it worked like that, thanks for
    clearing that up.


    I have another question, the room I'm making has a C kind of navigation shape
    and whenever I click an object that is in the opposite side of the walkable
    area the character tries to go in a straight line to the objects marker. How do
    I make the character navigate the scene so he can reach to the object's
    markers?.



    I don't know if I made any sense, If you can check the test game I'm making here (I just updated it):
    http://www.2sinpar.com/gametest/Temp.html , make the character walk in front of
    the third poster and then click on the cup on the desk to see what I mean.

  • Never mind that, I figured what was wrong with the navmesh :P
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.