Esempio n. 1
0
    private void Update()
    {
        body.velocity = new Vector2(direction.x * speed, direction.y * speed);

        direction = new Vector2(Input.GetAxisRaw("Horizontal") * speed, Input.GetAxisRaw("Vertical") * speed);

        //fix camera position in player position
        cameraFollower.GetPlayerPos(playerPos);
    }