Если я создам скрипт player controller который будет отвечать за передвижение объекта(гг) то как прикрепить камеру? Ну я чисто осваиваю движок поэтому скрипт не мой, вот он: using System.Collections; using System.Collections.Generic; using UnityEngine;
public class movePlayer : MonoBehaviour { private Rigidbody rb; public float speed = 0.5f; private Vector3 moveVector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class movePlayer : MonoBehaviour
{
private Rigidbody rb;
public float speed = 0.5f;
private Vector3 moveVector;
void Awake()
{
rb = GetComponent<Rigidbody>();
}
void Update()
{
moveVector.x = Input.GetAxis("Horizontal");
moveVector.z = Input.GetAxis("Vertical");
rb.MovePosition(rb.position + moveVector * speed * Time.deltaTime);
}
}