Xade
New member
- Joined
- Dec 21, 2020
- Messages
- 3
- Programming Experience
- Beginner
C#:
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public Rigidbody rb;
public float forwardForce = 2000f;
// FixedUpdate weil Physik und so
void FixedUpdate ()
{
// Add a forward force
rb.AddForce(0, 0, forwardForce * Time.deltaTime);
if ( Input.Getkey("d"))
{
rb.AddForce(500 * Time.deltaTime, 0, 0,);
}
}
}
wheres the problem the console says Assets\PlayerMovement.cs(17,52): error CS1525: Invalid expression term ')'
Last edited by a moderator: