Sunday, 17 April 2016
Craig Lang - Camera Move Revisited
I revisited the camera move script as I wanted the player to be able to view the environment the way they wanted. The script was fine before, however the problem was you couldn't reset the camera position. Using a similar technique I tried before with the camera zoom I created an object and attached it to the player. Using the transform.position script is used for the platforms, I then transformed the position of the main camera to the transform coordinates typed into the public default camera function. I would call this function when the player clicks the right mouse button. This enables the player to move the camera around and reset it to it's original position.
This is extremely helpful as the camera tends to change transformations when respawning. Although I would of rather fix this issue properly I am happy with the current solution I have created.
Labels:
Craig Lang,
Scripting,
Unity
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment