0
Unity movement
May someone assist with some 3D movement for Unity in C#?
1 ответ
0
public void Update(){
if(Input.GetKey("d")){
var Movement = transform.position;
Movement.x += 0.9f;
transform.position = Movement;
}
else if(Input.GetKey("a")){
var Movement = transform.position;
Movement.x -= 0.9f;
transform.position = Movement;
}
}
Its just a basic example of movement, put this code on Update method and insert the script on Character Object inside the scene