im trying to make and encreadibly basic rts simular to dune200, galatic civilisations ect ect so for a camera i have made the folowing code to let it move arround the screen…
using UnityEngine;
using System.Collections;
public class Camera : MonoBehaviour {
** public float cameraSpeed;**
** // Update is called once per frame**
** void Update ()**
** {**
__ float amtToMove = Input.GetAxisRaw (“Horizontal”)* cameraSpeed Time.deltaTime; // a value that allows to move a distance over 1 sec__
** //.GetAxis gives a smooth movement Raw gives a snapping feel like old arcade games*
__ transform.Translate(Vector3.right * amtToMove);__
__ float amtToMove1 = Input.GetAxisRaw (“Vertical”)* cameraSpeed Time.deltaTime; // a value that allows to move a distance over 1 sec__
** //.GetAxis gives a smooth movement Raw gives a snapping feel like old arcade games*
__ transform.Translate(Vector3.up * amtToMove1);__
** }**
}
i now need to create some way of allowing the mouse to select other objects on screen and on mouse click allow the object to move to the location selected useing pathfinding?
how would i even beguin to create this and what do i like script to the camera or a seprate script?