I’d like to smoothly adjust the camera position between the original position and field of view to a new one upon a trigger and back again when exiting the trigger area.
How would I approach this, i’m a newb at this? Could someone construct a sample script for me to learn?
I've looked into it and have it installed. I feel it's too complicated for me at the moment but do see its value. I will have to spend some time learning how to incorporate this. Unless you could give me an example on how to use it with the code I posted below on neoncraze's comment.
I have actually tried to do this for a project of mine and I’d suggest you look at using some of the Vector3 functions, Vector3.SmoothDamp and Vector3.Lerp, to damp/lerp your camera between positions. It works for me and should work fine for what you plan to accomplish, too. It’ll be easily transferable too as you’d be able to just have variables to store the Vector3 positions of where ever you want to move your camera to.
Your "update" function needs to have the first letter CAPITALIZED [SOLVED]
Check out [iTween][1], and use [MoveAdd][2] from [iTween][3] [1]: http://itween.pixelplacement.com/index.php [2]: http://itween.pixelplacement.com/documentation.php [3]: http://itween.pixelplacement.com/index.php
– Seth-McCumberI've looked into it and have it installed. I feel it's too complicated for me at the moment but do see its value. I will have to spend some time learning how to incorporate this. Unless you could give me an example on how to use it with the code I posted below on neoncraze's comment.
– rootedExample code void OnTriggerEnter(Collider Collider) { iTween.MoveAdd(GameObject.Find("Game Object Name"), new Vector3(0, 0, 0), 1); }
– Seth-McCumber