Hi there, I’m a noob (obviously) And I am basically trying to hack together a little game for fun using the Lerpz 3d platform tutorial as something to build upon.
Basically I have edited it so that once you collect so many pickups, your character changes into a different prefab. So I destroy the one that was there and create another.
This is all working fine my only problem is The camera is still set to follow the old destroyed prefab. Any suggestions as to what code I can use to change what the cameras target is? It is using the spring follow camera script from the Lerpz tutorial.
First, just to make things clear for you (it will help later) you cannot follow a prefag, as it isn’t instantiated. I get what you meant, to follow the instance, but better tell than cure (if that expression exist in english).
I don’t know what is the spring follow camera, but I’m gonna assume there is a target var somwhere.
In the script performing the swap between the old character and the new, you need a reference of that spring script. Then, it should look like that