Hi
I’am working on a classic 2D Platforms game, with Unity, and C# scripts.
The “original” feature: there are 2 (or 3 depending on the levels) characters to control (player1, player2, player3)
ONLY ONE is active at a time, and a UI.button switch from one to another.
To be complete, I also have 2 zoom button on this camera (in/out).
It works well for the player’s movements (and zoom), but I can’t control the camera, or more accurately, to chose which character to follow…
The camera stay attached to “player1”.
In my “ideal” idea :
- player1 active, camera following this player1
- click on button
- camera move (at variable speed) to player2
- camera attach to player2
- player2 become active
- camera follow now player2
So, only one camera… (i think)
It may be simple, but being relatively new to UNITY, I have never encountered this kind of problem (and my Internet searches did not yield anything)
Thank’s in advance if you have a solution to change the player followed by a camera…