|
Hi, I would like to switch between cameras depending on the position of my player position, how can I do this please? Thanks a lot for your time.
(comments are locked)
|
|
You can activate and deactivate cameras if you can get a hold of the object that holds them.
So If you had a script which kept track of all the cameras in your scene then you could switch cameras easily. For example here is a function which would go through an array of camera objects and turn a certain one on (based on the index sent to it).
You could use this function by calling it with a message
or by outright calling it
You just need to get hold of the instance of the script it's in
(comments are locked)
|
|
DastardlyBanana's answer would be more flexible, but i'll post my (very simple!) answer here anyway: You could check for a collision with a collider and then enabled/disable your cameras, so:
Camera1 and Camera2 are assigned in the editor, or you could assign them with code. Cheers.
(comments are locked)
|
|
Thanks because I've just looked at your answer I had a lot o thngs to do but it's not as interresting as your answer thanks to you 2!! Keep comments off of the answers area
Apr 22 '10 at 02:36 PM
spinaljack
(comments are locked)
|
