Have a Unity project due on Monday night for a teacher that doesn’t know Unity. Bummer, right?
Anyway, the assignment is a 2d top down dungeon crawler. I have the random maze setup. However, I’m trying to make it turn based. So instead of movement being a matter of acceleration and deceleration, I need to move a single unit on my 2d array. For the life of me I can’t get the code figured out, I’m pretty sure it’s something along the lines of:
if(Input.GetKey(KeyCode.W))
{
this.transform.Translate(Vector3.forwardTime.deltaTimespeed);
}
The problem is that I want it to go a single unit, instead of a distance. I know that I have to put 3 axis coordinates in there (0,0,0) but I’m not sure what else, if anything, I need. I think this is how it goes:
if(Input.GetKey(KeyCode.W))
{
this.transform.Translate(0,0,1);
}
Any help would be appreciated.
Have a few other questions about cameras, specifically getting a high angle 3rd person chase camera with a spotlight.