using System.Collections; using System.Collections.Generic; using UnityEngine; public class RCSFoward : MonoBehaviour { public float speed = 10f; Rigidbody rb; // Start is called before the first frame update void Start() { rb = GetComponent(); } // Update is called once per frame void Update() { if (Input.GetKey(KeyCode.Space)) { rb.AddForce(transform.forward * speed); } } }