Hi folks,
I’m currently prototyping, and I have a issue I cannot solve, or better - I don’t know what’s happening.
Have a look at this video, and the feets starting in 00:17:
Basically, I have some kind of jittering or glitch. Now, this is an animation made with MagicaVoxel, imported with PicaVoxel. PicaVoxel creates a mesh for every frame, and then displays them one after another.
This is how I currently move the character forward (basic script, found in the web some long time ago):
public class MoveForward : MonoBehaviour
{
public Rigidbody RigidBody;
public float movementSpeed = 2.0f;
public float clockwise = 250f;
public float counterClockwise = -250f;
void Start()
{
}
void Update()
{
transform.position += transform.forward * Time.deltaTime * movementSpeed;
if (Input.GetKey(KeyCode.S))
{
RigidBody.position -= transform.forward * Time.deltaTime * movementSpeed;
}
else if (Input.GetKey(KeyCode.A))
{
RigidBody.position -= transform.right * Time.deltaTime * movementSpeed;
}
else if (Input.GetKey(KeyCode.D))
{
RigidBody.position += transform.right * Time.deltaTime * movementSpeed;
}
if (Input.GetKey(KeyCode.E))
{
transform.Rotate(0, Time.deltaTime * clockwise, 0);
}
else if (Input.GetKey(KeyCode.Q))
{
transform.Rotate(0, Time.deltaTime * counterClockwise, 0);
}
}
}
I’m wondering: What causes this “jitter”, and how could I get rid of it?