The "Automotive" in query is a airplane. The query is fairly self explanatory.
Here is the Automotive within the Hierarchy:
Here is the automobile within the inspector:
And here is the PlayerMovement script:
utilizing UnityEngine;
public class PlayerMovement : MonoBehaviour
{
// --------------------------------
// References
// --------------------------------
public Rigidbody rb;
// --------------------------------
public float pressure = 500f;
void FixedUpdate()
{
if (Enter.GetKey("w") || Enter.GetKey("up"))
{
Debug.Log("Foreward");
rb.AddForce(0, 0, pressure * Time.deltaTime);
}
if (Enter.GetKey("a") || Enter.GetKey("left"))
{
rb.AddForce(-force * Time.deltaTime, 0, 0);
}
if (Enter.GetKey("s") || Enter.GetKey("down"))
{
rb.AddForce(0, 0, -force * Time.deltaTime);
}
if (Enter.GetKey("d") || Enter.GetKey("proper"))
{
rb.AddForce(pressure * Time.deltaTime, 0, 0);
}
}
}
It does present the "Foreward" log once I press W or up arrow, so I do know that is working.
(Facet notice: I do know this would possibly not get me precise automobile physics, I am simply attempting to ensure I can transfer the automobile in any respect first)