How-To: Use 3rd Person Character Controller With Device Camera

TruAmbition

New member
Greetings All,

I am working on a project that is challenging me a bit in regards to using the Character Controller. I would like to use this asset to control my Character but I don't want any Camera requirements. I would like to use the mobile device camera, but allow the character to be controlled with the asset +Easy Touch UI. For one, is this possible ? If so, how do I setup a character without camera controller and not throw errors.

Error From Console when trying to move my character.

Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.ThirdPersonController.Character.MovementTypes.Adventure.GetDeltaYawRotation (System.Single characterHorizontalMovement, System.Single characterForwardMovement, System.Single cameraHorizontalMovement, System.Single cameraVerticalMovement) (at Assets/Opsive/UltimateCharacterController/Scripts/ThirdPersonController/Character/MovementTypes/Adventure.cs:72)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler.GetDeltaYawRotation () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:196)
Opsive.UltimateCharacterController.Game.KinematicObjectManager+KinematicCharacter.FixedMove (System.Boolean manualMove) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:184)
Opsive.UltimateCharacterController.Game.KinematicObjectManager.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:671)

Please advise.

Thanks,

-Truman
 
You're getting that error because the character doesn't have a look source attached. For your situation you'll want to create a new ILookSource - take a look at the LocalLookSource for a basic example.
 
Top