Forum rules - please read before posting.

SamplePlayerFP camera not working

Some how got in a pickle with this. currently playing the game shows "Display 1. No Cameras Rendering."

In AC Game Editor Default Camera is set to the "FirstPersonCamera" object within the SamplePlayerFB prefab (which is in the scene).

Also getting errors on the console as follows:

NullReferenceException: Object reference not set to an instance of an object
AC.PlayerCursor.DrawCursor () (at Assets/AdventureCreator/Scripts/Controls/PlayerCursor.cs:440)
AC.StateHandler._OnGUI () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:502)
AC.StateHandler.OnGUI () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:414)
UnityEditor.GUIView:ProcessEvent(EntityId, IntPtr, Boolean&)

NullReferenceException: Object reference not set to an instance of an object
AC.MainCamera.ForwardVector () (at Assets/AdventureCreator/Scripts/Camera/MainCamera.cs:985)
AC.Char.PrepareSpriteChild (System.Boolean isTopDown, System.Boolean isUnity2D) (at Assets/AdventureCreator/Scripts/Character/Char.cs:3038)
AC.Char.BaseUpdate () (at Assets/AdventureCreator/Scripts/Character/Char.cs:681)
AC.NPC._Update () (at Assets/AdventureCreator/Scripts/Character/NPC.cs:118)
AC.Player._Update () (at Assets/AdventureCreator/Scripts/Character/Player.cs:139)
AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:305)

Help appreciated

Comments

  • Actually have Camera gameobject unticked within the prefab. However the console errors persist and I have no player movement right now

  • I can see that maincamera and playercursor scripts are meant to be linked to something, but not sure what

  • Restart my project so you can ignore this question if you like. Thanks.

  • It sounds like your scene has no MainCamera object - this is a separate Camera that also have AC's Main Camera component attached, and is the one that performs the actual rendering (GameCameras and the FP Cameras are only references).

    If it's been removed from the scene, go to the top of the Scene Manager, and click "Without folders" to have AC set up the scene again and re-add it.

  • I think that is correct and good to know for the future. I did restart my scene anyway. Thanks!

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.