So im just messing about with character classes and player controller class.
Previously I was doing all my inputs in the character class. But I wanted to have a proper player controller and derive from the base character class for the AI characters.
So. Im after some pointers.
I have changed my character class around a bit and created a player controller class to control all the inputs n what not.
My baseCharacter class holds functionality for calculating health and energy and thats about it.
My player controller handles Input as well as two functions.
One is a ray trace which calculates if you can use an actor in the world, the other calculates the nearest actor of a particular type to use as a respawn point.
Im curious as to the best place to keep those functions. Should they exist in the character/pawn class or within the player controller.
The problem is, after i kill and respawn the player the log is spammed with
Blueprint Runtime Error: Attempted to access Nox_BaseCharacter_C_0 via property BaseCharacterRef, but Nox_BaseCharacter_C_0 is pending kill from function: ‘GetUsableActor’ from node: LineTraceForObjects in graph: GetUsableActor in object: Nox_PlayerController with description: Attempted to access Nox_BaseCharacter_C_0 via property BaseCharacterRef, but Nox_BaseCharacter_C_0 is pending kill
Previously, just using a character class. This all worked a bit better. After respawning, the HUD reappeared and I didnt get the log spam from the usable actor.
Im just trying to find out if im going about this sort of behaviour in the right way.
Any help is very much appreciated.