Hi I am making a 2D game, and I am trying to solve something on this script:
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour {
public float speed = 0.7f;
public float maxSpeed = 0.7f;
void Start () {
}
// Update is called once per frame
void Update () {
Vector3 temp = transform.position;
temp.x += speed * Time.deltaTime;
transform.position = temp;
speed += 0.1f * Time.deltaTime;
//if (speed < maxSpeed)
// speed = maxSpeed;
}
}
IGNORE THE COMMENTS
As you can see, my camera moves to the right, and moves faster and faster, over time. But the SPEED of the progression of the camera moves to fast. So the transition of the camera moving from slow to fast is to fast. I want that transition of slow to fast for the camera to be slower. Not how slow the camera starts, but the progression of the camera I want to be slow. Is there anything to use other then Time.delta time? Or do I add code, and/or take away code?
I will be giving points for a good answer:
5 points for people who answer within 45 minutes.
3 points for anybody after that.
Make sure it is a good answer, or I will not be giving any points.
Thank your for helping for everybody who helps.
No problem
– Garazbolg