e.g how to fix unity error saying expecxted }

Jacob Thomas 0 Reputation points
2024-07-18T18:01:15.9+00:00

using System.Collections; using System.Collections.Generic; using UnityEngine;

public class playerspaceship : MonoBehaviour { public float ThrustForce = 1000f; public float TurnTorque = 1000f; private Rigidbody rigidbody;

private void Start() { _rigidbody = GetComponent<Rigidbody>();

}

private void FixedUpdate() {

if (Input.GetKey(KeyCode.W)) { _rigidbody.AddForce(transform.forward * ThrustForce * Time.FixedDeltaTime);

}

if (Input.GetKey.A) { _rigidbody.AddTorque(-transform.up * TurnTorque * Time.FixedDeltaTime); } else if (Input.GetKey(KeyCode.D)) { _rigidbody.AddTorque (transform.up * TurnTorque * Time.FixedDeltaTime); { // Start is called before the first frame update void Start() {

}

// Update is called once per frame
void Update()
```  { 
 }  
} {{{
Developer technologies | Visual Studio | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.