I'm currently trying to create a Camera Control for unity (to follow around a prefab and be able to zoom and such ...
I am very new to C#
an issue I am having with this script is that
- camera zooming to 0,0,0. (when I need it to stay at it's current Y-axis, I tried changing the void "Move()" but the vector requires 3 m_....'s
I also need to write a piece of code that will allow the player to zoom the camera in and out using the scroll wheel... (In "Public Void Update()"...
I've been looking through guides and videos and can't find anything to assist me with this..
this is the section of code I require help with :
private void FixedUpdate()
{
Move();
}
private void Move()
{
m_DesiredPosition = m_target.position;
transform.position = Vector3.SmoothDamp(transform.position,
m_DesiredPosition, ref m_MoveVelocity, m_DampTime);
}
public void Update()
{
// Get the scroll value of the mouse scroll wheel
// float scroll = Input.GetAxis("Mouse ScrollWheel");
// Is the scroll value not 0?
// Modify the orthographic size by the scroll value
Camera.main.orthographicSize = 4.8f;
}