Hi I was just wondering what position will take priority with a child objects position. Does the position of the parent object or a position set through a script take priority?
I'm asking this because I have a player with a camera as a child object which by default follows the parent. I'm trying to implement a system where I can set the transform.position of the camera to the other player in the game when you finish, sort of like a spectator mode. The original player that the camera follows is constantly falling when they complete the game as they fall out the map, and I can't destroy the player as it holds information about their score that I need later.
Possibly the constantly moving player (as it falls) is stopping the camera from lerping to the other player in the game?
GameObject Targetfor that particular camera and use that as your main point of the logic. IfTargetis set (Target != null) then follow that particularTargetobject. If it is not set (Target == null) then find anotherTargetand follow that object. - MateuszGameObject. Based on that you can just instantiate theCameraobject without setting any target and then distinguish which player to attach to ( based on network id or something ). Then when your player dies ( or whatever it takes to "detach" ) just call some method on yourCamerabehavior to set target to another player or null and the use method to find new target. - Mateusz