Problems with Camera and Instantiating....

Vlaxep

Active member
Hi,

I'm using an existing PUNPlayerCharacterPrefab, with a function attached for Avatar switching, whereby I'm doing the following:

- Instantiating different PUNPlayerCharacterPrefab (current one is still active)
- Setting CameraController.Character to the new Prefab
- Destroying the Old

The result is bad - Camera does not attach to the new prefab, I get the 'look source' error a lot of people have.

What process and functions should I follow to successfully bring in a new prefab owned by the local player and switch control to that, also destroying the old one - just need a clean switch with no issues from the MainCamera.... What are the requirements to ensure nothing can break with this transition?
 
Ah Ok i think there was a timing issue perhaps in referencing the player? I dunno exactly what did it , changed a looot of things before it finally worked lol.
 
Top