I’m working on a racing game prototype. I have 7 NavMesh agents scaled cubes and 1 player. These 8 objects have a ridigbody component (but I think the agents ignore the rigidbody). Everything moves smoothly but the player. I’ve made a video of it, I hope you can see clearly the issue:
The last “car” moving is the player. This is the only script running in the test video:
function Start () {
rb = GetComponent.<Rigidbody>();
}
function FixedUpdate () {
var grounded : boolean = true;
if (Input.GetAxisRaw("Vertical") == 1 && grounded) {
rb.AddRelativeForce(Vector3.forward * acceleration);
}
//Brakes
if (Input.GetAxisRaw("Vertical") == -1 && grounded) {
rb.AddRelativeForce(Vector3.back * acceleration);
}
I thought it was a camera issue, that’s why the camera is static and on top. Any idea on what’s causing the stutter? Removing the rigidbody is not an option to solve this.