This is my first time making video games and I decided to use unity because mainly it was free. I am learning about terrain but my main problem is how to make the character your using move and how to make the camera follow him/her. Can someone help me out and explain it very simply because like I said this is my first time?
var MoveSpeed : int = 0.5;
function Update () {
if(Input.GetKey(KeyCode.UpArrow)){
transform.Translate(Vector3,MoveSpeed,0,0);
}
}
I couldn’t test it as i’m using my phone.
This is just a simple way of moving your object if you change “Translate” into Rotate you can well rotate your object.
i’m new myself
I would reccomend http://www.unity3dstudent.com/ site since your new and is a great place to start.
This should work for you.
this is a
using UnityEngine;
using System.Collections;
public class Movement : MonoBehaviour {
public int movementspeed = 100;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKey (KeyCode.A)) {
transform.Translate (Vector3.left * movementspeed * Time.deltaTime);
}
if(Input.GetKey (KeyCode.D)) {
transform.Translate (Vector3. right * movementspeed * Time.deltaTime);
}
}
}
You can also use this for moving an object.
float movSpeed = 7f;
void Update {
transform.Translate (new Vector3 (Input.GetAxis("Horizontal")*movSpeed*Time.deltaTime), 0, Input.GetAxis("Vertical")*movSpeed*Time.deltaTime));
}
Youtube can become a good friend to you learning Unity - there are lots of tutorials a quick search brought up this: http://www.youtube.com/watch?v=od78RhlLXUI&feature=related
there are much more and maybe some better - watch a couple of them will point you the right direction.
you can find tutorials everywhere on the web most are really simple, quick and nice to get familiar with Unity Ask google.
I appreciate it!. I really like it when people get together and share ideas. Great website, continue the good work!. Either way, great web and I look forward to seeing it grow over time. Thank you so much.
http://supersmashflash-2.com |=>super smash flash 2
http://bloonstowerdefense5game.com |=>bloons tower defense 5